diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-03-02 20:01:37 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-03-02 20:01:37 +0000 |
commit | ef10b1dda693467283a3645a5da610e810149764 (patch) | |
tree | 3eeb8918d39d675108073c8b76d6dd10586a608c /libgo/go/net/ipsock_posix.go | |
parent | ea6ad4ae9afbd45b5c19aadab39ddbf1db0d50f8 (diff) | |
download | gcc-ef10b1dda693467283a3645a5da610e810149764.tar.gz |
libgo: Update to weekly.2012-02-22 release.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184819 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo/go/net/ipsock_posix.go')
-rw-r--r-- | libgo/go/net/ipsock_posix.go | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/libgo/go/net/ipsock_posix.go b/libgo/go/net/ipsock_posix.go index 4da18a5061a..4841057d6be 100644 --- a/libgo/go/net/ipsock_posix.go +++ b/libgo/go/net/ipsock_posix.go @@ -105,21 +105,20 @@ type sockaddr interface { } func internetSocket(net string, laddr, raddr sockaddr, sotype, proto int, mode string, toAddr func(syscall.Sockaddr) Addr) (fd *netFD, err error) { - var oserr error var la, ra syscall.Sockaddr family := favoriteAddrFamily(net, laddr, raddr, mode) if laddr != nil { - if la, oserr = laddr.sockaddr(family); oserr != nil { + if la, err = laddr.sockaddr(family); err != nil { goto Error } } if raddr != nil { - if ra, oserr = raddr.sockaddr(family); oserr != nil { + if ra, err = raddr.sockaddr(family); err != nil { goto Error } } - fd, oserr = socket(net, family, sotype, proto, la, ra, toAddr) - if oserr != nil { + fd, err = socket(net, family, sotype, proto, la, ra, toAddr) + if err != nil { goto Error } return fd, nil @@ -129,7 +128,7 @@ Error: if mode == "listen" { addr = laddr } - return nil, &OpError{mode, net, addr, oserr} + return nil, &OpError{mode, net, addr, err} } func ipToSockaddr(family int, ip IP, port int) (syscall.Sockaddr, error) { |