1
0
mirror of https://github.com/golang/go synced 2024-11-24 02:30:12 -07:00

runtime: make errno positive in netpollopen

Make netpollopen return what Windows GetLastError API returns.
It is probably copy / paste error from long time ago.

Change-Id: I28f78718c15fef3e8b5f5d11a259533d7e9c6185
Reviewed-on: https://go-review.googlesource.com/72592
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
Alex Brainman 2017-10-23 17:27:34 +11:00
parent efa9efe8e4
commit 4a0dcc2de1

View File

@ -47,7 +47,7 @@ func netpolldescriptor() uintptr {
func netpollopen(fd uintptr, pd *pollDesc) int32 {
if stdcall4(_CreateIoCompletionPort, fd, iocphandle, 0, 0) == 0 {
return -int32(getlasterror())
return int32(getlasterror())
}
return 0
}