mirror of
https://github.com/golang/go
synced 2024-11-23 17:50:06 -07:00
net: drop unnecessary cast
Change-Id: I9b058472f5b4943db6e6f1c1243411ce61624c18 Reviewed-on: https://go-review.googlesource.com/9916 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
754e98cb82
commit
64b1aa12b3
@ -225,7 +225,7 @@ func (fd *netFD) Read(p []byte) (n int, err error) {
|
||||
return 0, err
|
||||
}
|
||||
for {
|
||||
n, err = syscall.Read(int(fd.sysfd), p)
|
||||
n, err = syscall.Read(fd.sysfd, p)
|
||||
if err != nil {
|
||||
n = 0
|
||||
if err == syscall.EAGAIN {
|
||||
@ -307,7 +307,7 @@ func (fd *netFD) Write(p []byte) (nn int, err error) {
|
||||
}
|
||||
for {
|
||||
var n int
|
||||
n, err = syscall.Write(int(fd.sysfd), p[nn:])
|
||||
n, err = syscall.Write(fd.sysfd, p[nn:])
|
||||
if n > 0 {
|
||||
nn += n
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user