From: Dave Cheney Date: Wed, 21 Nov 2012 04:04:22 +0000 (+1100) Subject: net: remove another unguarded sysfile == nil check X-Git-Tag: go1.1rc2~1829 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=d28133dc9f452150c116793f3dd086bbe20db3d0;p=gostls13.git net: remove another unguarded sysfile == nil check Putting aside the unguarded access to fd.sysfile, the condition will never be true as fd.incref above handles the closed condition. R=mikioh.mikioh, dvyukov CC=golang-dev https://golang.org/cl/6845062 --- diff --git a/src/pkg/net/fd_unix.go b/src/pkg/net/fd_unix.go index 096ad41bbf..d87c51ec66 100644 --- a/src/pkg/net/fd_unix.go +++ b/src/pkg/net/fd_unix.go @@ -509,10 +509,6 @@ func (fd *netFD) Write(p []byte) (int, error) { return 0, err } defer fd.decref() - if fd.sysfile == nil { - return 0, syscall.EINVAL - } - var err error nn := 0 for {