mirror of
https://github.com/golang/go
synced 2024-11-23 00:10:07 -07:00
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
This commit is contained in:
parent
7bce6f9386
commit
d28133dc9f
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user