Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
a5aa4d33
Commit
a5aa4d33
authored
Jan 17, 2012
by
Mikio Hara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
net: fix unintentional error variable shadowing
R=rsc CC=golang-dev
https://golang.org/cl/5543065
parent
b24d1cb5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
src/pkg/net/sock.go
src/pkg/net/sock.go
+4
-4
No files found.
src/pkg/net/sock.go
View file @
a5aa4d33
...
@@ -20,7 +20,7 @@ var listenerBacklog = maxListenerBacklog()
...
@@ -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
)
{
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.
// See ../syscall/exec.go for description of ForkLock.
syscall
.
ForkLock
.
RLock
()
syscall
.
ForkLock
.
RLock
()
s
,
e
:=
syscall
.
Socket
(
f
,
p
,
t
)
s
,
e
rr
:=
syscall
.
Socket
(
f
,
p
,
t
)
if
err
!=
nil
{
if
err
!=
nil
{
syscall
.
ForkLock
.
RUnlock
()
syscall
.
ForkLock
.
RUnlock
()
return
nil
,
err
return
nil
,
err
...
@@ -31,10 +31,10 @@ func socket(net string, f, p, t int, la, ra syscall.Sockaddr, toAddr func(syscal
...
@@ -31,10 +31,10 @@ func socket(net string, f, p, t int, la, ra syscall.Sockaddr, toAddr func(syscal
setDefaultSockopts
(
s
,
f
,
p
)
setDefaultSockopts
(
s
,
f
,
p
)
if
la
!=
nil
{
if
la
!=
nil
{
e
=
syscall
.
Bind
(
s
,
la
)
e
rr
=
syscall
.
Bind
(
s
,
la
)
if
e
!=
nil
{
if
e
rr
!=
nil
{
closesocket
(
s
)
closesocket
(
s
)
return
nil
,
e
return
nil
,
e
rr
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment