Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(2079)

Issue 26770045: code review 26770045: net: always check error from syscall.Getsockname (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 5 months ago by dave
Modified:
10 years, 4 months ago
Reviewers:
rsc, mikio, iant
CC:
golang-dev
Visibility:
Public.

Description

net: always check error from syscall.Getsockname This was spotted during the sunos port. Credit for identifying the problem goes to Aram Hăvărneanu.

Patch Set 1 #

Patch Set 2 : diff -r 6ad0ec54cf2d https://code.google.com/p/go #

Patch Set 3 : diff -r 6ad0ec54cf2d https://code.google.com/p/go #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -1 line) Patch
M src/pkg/net/sock_posix.go View 1 1 chunk +4 lines, -1 line 1 comment Download

Messages

Total messages: 8
dave_cheney.net
Hello rsc@golang.org, mikioh.mikioh@gmail.com (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go
10 years, 5 months ago (2013-11-15 23:45:49 UTC) #1
iant
https://codereview.appspot.com/26770045/diff/40001/src/pkg/net/sock_posix.go File src/pkg/net/sock_posix.go (right): https://codereview.appspot.com/26770045/diff/40001/src/pkg/net/sock_posix.go#newcode156 src/pkg/net/sock_posix.go:156: lsa, err := syscall.Getsockname(fd.sysfd) There are two other places ...
10 years, 5 months ago (2013-11-16 00:28:19 UTC) #2
dave_cheney.net
> On 16 Nov 2013, at 11:28, iant@golang.org wrote: > > > https://codereview.appspot.com/26770045/diff/40001/src/pkg/net/sock_posix.go > File ...
10 years, 5 months ago (2013-11-16 00:34:11 UTC) #3
mikio
On Sat, Nov 16, 2013 at 8:45 AM, <dave@cheney.net> wrote: > - lsa, _ := ...
10 years, 5 months ago (2013-11-16 01:16:11 UTC) #4
dave_cheney.net
Understood. > On 16 Nov 2013, at 12:16, Mikio Hara <mikioh.mikioh@gmail.com> wrote: > >> On ...
10 years, 5 months ago (2013-11-16 01:19:14 UTC) #5
rsc
The ignored error here is intentional. Even if getsockname fails the fd should be usable ...
10 years, 5 months ago (2013-11-27 16:52:47 UTC) #6
rsc
not lgtm R=close
10 years, 4 months ago (2013-12-18 20:29:34 UTC) #7
dave_cheney.net
10 years, 4 months ago (2013-12-18 23:46:11 UTC) #8
*** Abandoned ***
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b