1
0
mirror of https://github.com/golang/go synced 2024-11-12 05:30:21 -07:00

net: eliminate odd if statement with identical branches

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/7447044
This commit is contained in:
John Graham-Cumming 2013-03-01 11:56:33 -08:00 committed by Ian Lance Taylor
parent be6e82e30b
commit f42a11ec8e

View File

@ -182,11 +182,7 @@ func (s *pollServer) CheckDeadlines() {
if t > 0 {
if t <= now {
delete(s.pending, key)
if mode == 'r' {
s.poll.DelFD(fd.sysfd, mode)
} else {
s.poll.DelFD(fd.sysfd, mode)
}
s.poll.DelFD(fd.sysfd, mode)
s.WakeFD(fd, mode, errTimeout)
} else if nextDeadline == 0 || t < nextDeadline {
nextDeadline = t