]> Cypherpunks repositories - gostls13.git/commitdiff
net: eliminate odd if statement with identical branches
authorJohn Graham-Cumming <jgc@jgc.org>
Fri, 1 Mar 2013 19:56:33 +0000 (11:56 -0800)
committerIan Lance Taylor <iant@golang.org>
Fri, 1 Mar 2013 19:56:33 +0000 (11:56 -0800)
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/7447044

src/pkg/net/fd_unix.go

index 8ef960f2b52c6bdaaf004c1d99deb909733ff2aa..0540df8255b3c3cfbc442f7c38d788d6209c988e 100644 (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