]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: poll: remove a useless double-check on fdtab[fd].owner
authorWilly Tarreau <w@1wt.eu>
Thu, 13 Dec 2012 22:41:12 +0000 (23:41 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 13 Dec 2012 22:41:12 +0000 (23:41 +0100)
This check is already performed a few lines above in the same loop,
remove it from the condition.

src/ev_epoll.c
src/ev_poll.c
src/ev_select.c

index 8b0d684d6f19902cf32d6ba8ff31939d51e3e962..a9b841035cfc136499ce1fe51650763c1eb60334 100644 (file)
@@ -161,7 +161,7 @@ REGPRM2 static void _do_poll(struct poller *p, int exp)
                                ((e & EPOLLHUP) ? FD_POLL_HUP : 0);
                }
 
-               if (fdtab[fd].iocb && fdtab[fd].owner && fdtab[fd].ev) {
+               if (fdtab[fd].iocb && fdtab[fd].ev) {
                        int new_updt, old_updt = fd_nbupdt; /* Save number of updates to detect creation of new FDs. */
 
                        /* Mark the events as speculative before processing
index 2c7501d9ddc8447e155d3478d7d32345dabafae2..c09232e4b90b4ef0c465b2b16ed2d9f283f92f31 100644 (file)
@@ -170,7 +170,7 @@ REGPRM2 static void _do_poll(struct poller *p, int exp)
                                ((e & POLLHUP) ? FD_POLL_HUP : 0);
                }
 
-               if (fdtab[fd].iocb && fdtab[fd].owner && fdtab[fd].ev) {
+               if (fdtab[fd].iocb && fdtab[fd].ev) {
                        /* Mark the events as speculative before processing
                         * them so that if nothing can be done we don't need
                         * to poll again.
index 356eed735fba2685292b6374aa2bed1419fb8aca..48a62da18a17198b57fa5f4c05306b3490320e2d 100644 (file)
@@ -156,7 +156,7 @@ REGPRM2 static void _do_poll(struct poller *p, int exp)
                        if (FD_ISSET(fd, tmp_evts[DIR_WR]))
                                fdtab[fd].ev |= FD_POLL_OUT;
 
-                       if (fdtab[fd].iocb && fdtab[fd].owner && fdtab[fd].ev) {
+                       if (fdtab[fd].iocb && fdtab[fd].ev) {
                                /* Mark the events as speculative before processing
                                 * them so that if nothing can be done we don't need
                                 * to poll again.