]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: pollers: remove dead code in the polling loop
authorWilly Tarreau <w@1wt.eu>
Mon, 12 Sep 2022 07:35:44 +0000 (09:35 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 12 Sep 2022 07:35:44 +0000 (09:35 +0200)
As reported by Ilya and Coverity in issue #1858, since recent commit
eea152ee6 ("BUG/MINOR: signals/poller: ensure wakeup from signals")
which removed the test for the global signal flag from the pollers'
loop, the remaining "wake" flag doesn't need to be tested since it
already participates to zeroing the wait_time and will be caught
on the previous line.

Let's just remove that test now.

src/ev_epoll.c
src/ev_evports.c
src/ev_kqueue.c

index 880aa584d4b199aa940f40e824d246c8a708cc0c..679e5e873447276e973822b3f153b64b8f477766 100644 (file)
@@ -238,8 +238,6 @@ static void _do_poll(struct poller *p, int exp, int wake)
                }
                if (timeout || !wait_time)
                        break;
-               if (wake)
-                       break;
                if (tick_isset(exp) && tick_is_expired(exp, now_ms))
                        break;
        } while (1);
index 0a7df15d3b4da366bf91b6ce898513225698e842..38fd1837903ecb1b6460498b3e7ead38214c7d18 100644 (file)
@@ -217,8 +217,6 @@ static void _do_poll(struct poller *p, int exp, int wake)
                        break;
                if (timeout || !wait_time)
                        break;
-               if (wake)
-                       break;
                if (tick_isset(exp) && tick_is_expired(exp, now_ms))
                        break;
        } while(1);
index 4796e680a44b517c6d9cea545237567f80b71dce..e8097620253f140dd5c4cad13bfd5d60a2b582d3 100644 (file)
@@ -191,8 +191,6 @@ static void _do_poll(struct poller *p, int exp, int wake)
                }
                if (timeout || !wait_time)
                        break;
-               if (wake)
-                       break;
                if (tick_isset(exp) && tick_is_expired(exp, now_ms))
                        break;
        } while (1);