From d28133dc9f452150c116793f3dd086bbe20db3d0 Mon Sep 17 00:00:00 2001 From: Dave Cheney Date: Wed, 21 Nov 2012 15:04:22 +1100 Subject: [PATCH] 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 --- src/pkg/net/fd_unix.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/pkg/net/fd_unix.go b/src/pkg/net/fd_unix.go index 096ad41bbfa..d87c51ec663 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 {