summaryrefslogtreecommitdiff
path: root/libgo/go/net/newpollserver.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/net/newpollserver.go')
-rw-r--r--libgo/go/net/newpollserver.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/libgo/go/net/newpollserver.go b/libgo/go/net/newpollserver.go
index 9ad6f7ba276..035df4a6ff1 100644
--- a/libgo/go/net/newpollserver.go
+++ b/libgo/go/net/newpollserver.go
@@ -18,11 +18,10 @@ func newPollServer() (s *pollServer, err error) {
if s.pr, s.pw, err = os.Pipe(); err != nil {
return nil, err
}
- var e int
- if e = syscall.SetNonblock(s.pr.Fd(), true); e != 0 {
+ if err = syscall.SetNonblock(s.pr.Fd(), true); err != nil {
goto Errno
}
- if e = syscall.SetNonblock(s.pw.Fd(), true); e != 0 {
+ if err = syscall.SetNonblock(s.pw.Fd(), true); err != nil {
goto Errno
}
if s.poll, err = newpollster(); err != nil {
@@ -37,7 +36,7 @@ func newPollServer() (s *pollServer, err error) {
return s, nil
Errno:
- err = &os.PathError{"setnonblock", s.pr.Name(), os.Errno(e)}
+ err = &os.PathError{"setnonblock", s.pr.Name(), err}
Error:
s.pr.Close()
s.pw.Close()