From: Willy Tarreau Date: Mon, 12 Sep 2022 07:35:44 +0000 (+0200) Subject: CLEANUP: pollers: remove dead code in the polling loop X-Git-Tag: v2.7-dev6~33 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=af985e0151c7d12d9dac4fc364b5c50d3db1e1db;p=thirdparty%2Fhaproxy.git CLEANUP: pollers: remove dead code in the polling loop 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. --- diff --git a/src/ev_epoll.c b/src/ev_epoll.c index 880aa584d4..679e5e8734 100644 --- a/src/ev_epoll.c +++ b/src/ev_epoll.c @@ -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); diff --git a/src/ev_evports.c b/src/ev_evports.c index 0a7df15d3b..38fd183790 100644 --- a/src/ev_evports.c +++ b/src/ev_evports.c @@ -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); diff --git a/src/ev_kqueue.c b/src/ev_kqueue.c index 4796e680a4..e809762025 100644 --- a/src/ev_kqueue.c +++ b/src/ev_kqueue.c @@ -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);