Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
509b9b7a
Commit
509b9b7a
authored
Sep 27, 2017
by
Ian Lance Taylor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
net: check Getsockname error return
Reviewed-on:
https://go-review.googlesource.com/64550
From-SVN: r253231
parent
b55c7343
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
gcc/go/gofrontend/MERGE
+1
-1
libgo/go/net/sock_posix.go
+8
-2
No files found.
gcc/go/gofrontend/MERGE
View file @
509b9b7a
e0c1f0b645b12a544b484c0f477f8fb6f5980550
cdf1f58c7578980e1d1949680c7e404961b7c153
The first line of this file holds the git revision number of the last
merge done from the gofrontend repository.
libgo/go/net/sock_posix.go
View file @
509b9b7a
...
...
@@ -182,7 +182,10 @@ func (fd *netFD) listenStream(laddr sockaddr, backlog int) error {
if
err
:=
fd
.
init
();
err
!=
nil
{
return
err
}
lsa
,
_
:=
syscall
.
Getsockname
(
fd
.
pfd
.
Sysfd
)
lsa
,
err
:=
syscall
.
Getsockname
(
fd
.
pfd
.
Sysfd
)
if
err
!=
nil
{
return
os
.
NewSyscallError
(
"getsockname"
,
err
)
}
fd
.
setAddr
(
fd
.
addrFunc
()(
lsa
),
nil
)
return
nil
}
...
...
@@ -221,7 +224,10 @@ func (fd *netFD) listenDatagram(laddr sockaddr) error {
if
err
:=
fd
.
init
();
err
!=
nil
{
return
err
}
lsa
,
_
:=
syscall
.
Getsockname
(
fd
.
pfd
.
Sysfd
)
lsa
,
err
:=
syscall
.
Getsockname
(
fd
.
pfd
.
Sysfd
)
if
err
!=
nil
{
return
os
.
NewSyscallError
(
"getsockname"
,
err
)
}
fd
.
setAddr
(
fd
.
addrFunc
()(
lsa
),
nil
)
return
nil
}
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