diff options
Diffstat (limited to 'libgo/go/net/sock.go')
-rw-r--r-- | libgo/go/net/sock.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libgo/go/net/sock.go b/libgo/go/net/sock.go index d9df02cd63f..33f11f219c9 100644 --- a/libgo/go/net/sock.go +++ b/libgo/go/net/sock.go @@ -28,9 +28,9 @@ func socket(net string, f, p, t int, la, ra syscall.Sockaddr, toAddr func(syscal // See ../syscall/exec.go for description of ForkLock. syscall.ForkLock.RLock() s, e := syscall.Socket(f, p, t) - if e != 0 { + if err != nil { syscall.ForkLock.RUnlock() - return nil, os.Errno(e) + return nil, err } syscall.CloseOnExec(s) syscall.ForkLock.RUnlock() @@ -39,9 +39,9 @@ func socket(net string, f, p, t int, la, ra syscall.Sockaddr, toAddr func(syscal if la != nil { e = syscall.Bind(s, la) - if e != 0 { + if e != nil { closesocket(s) - return nil, os.Errno(e) + return nil, e } } |