From a5aa4d3307ccc557127d333b7b084b52d5097979 Mon Sep 17 00:00:00 2001 From: Mikio Hara Date: Tue, 17 Jan 2012 10:59:39 +0900 Subject: [PATCH] net: fix unintentional error variable shadowing R=rsc CC=golang-dev https://golang.org/cl/5543065 --- src/pkg/net/sock.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pkg/net/sock.go b/src/pkg/net/sock.go index 881c922a25f..5e775e87d91 100644 --- a/src/pkg/net/sock.go +++ b/src/pkg/net/sock.go @@ -20,7 +20,7 @@ var listenerBacklog = maxListenerBacklog() func socket(net string, f, p, t int, la, ra syscall.Sockaddr, toAddr func(syscall.Sockaddr) Addr) (fd *netFD, err error) { // See ../syscall/exec.go for description of ForkLock. syscall.ForkLock.RLock() - s, e := syscall.Socket(f, p, t) + s, err := syscall.Socket(f, p, t) if err != nil { syscall.ForkLock.RUnlock() return nil, err @@ -31,10 +31,10 @@ func socket(net string, f, p, t int, la, ra syscall.Sockaddr, toAddr func(syscal setDefaultSockopts(s, f, p) if la != nil { - e = syscall.Bind(s, la) - if e != nil { + err = syscall.Bind(s, la) + if err != nil { closesocket(s) - return nil, e + return nil, err } }