Commit d05f31a3 authored by Shivansh Rai's avatar Shivansh Rai Committed by Brad Fitzpatrick

internal/poll: Avoid evaluating condition for an unreachable branch

Change-Id: I868dcaf84767d631bc8f1b6ef6bcb3ec18047259
Reviewed-on: https://go-review.googlesource.com/116135Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent a3593685
......@@ -32,8 +32,7 @@ func SendFile(dstFD *FD, src int, pos, remain int64) (int64, error) {
pos += int64(n)
written += int64(n)
remain -= int64(n)
}
if n == 0 && err1 == nil {
} else if n == 0 && err1 == nil {
break
}
if err1 == syscall.EAGAIN {
......
......@@ -29,8 +29,7 @@ func SendFile(dstFD *FD, src int, remain int64) (int64, error) {
if n > 0 {
written += int64(n)
remain -= int64(n)
}
if n == 0 && err1 == nil {
} else if n == 0 && err1 == nil {
break
}
if err1 == syscall.EAGAIN {
......
......@@ -39,8 +39,7 @@ func SendFile(dstFD *FD, src int, pos, remain int64) (int64, error) {
pos += int64(n)
written += int64(n)
remain -= int64(n)
}
if n == 0 && err1 == nil {
} else if n == 0 && err1 == nil {
break
}
if err1 == syscall.EAGAIN {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment