From: John Graham-Cumming Date: Fri, 1 Mar 2013 19:56:33 +0000 (-0800) Subject: net: eliminate odd if statement with identical branches X-Git-Tag: go1.1rc2~736 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=f42a11ec8e960f48c373b5c931b40def3bc2c486;p=gostls13.git net: eliminate odd if statement with identical branches R=golang-dev, iant CC=golang-dev https://golang.org/cl/7447044 --- diff --git a/src/pkg/net/fd_unix.go b/src/pkg/net/fd_unix.go index 8ef960f2b5..0540df8255 100644 --- a/src/pkg/net/fd_unix.go +++ b/src/pkg/net/fd_unix.go @@ -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