From 2a30f4d87e05d13df0b0cb99d3718e016a560e1a Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Tue, 28 Sep 2021 09:56:44 +0200 Subject: [PATCH] CLEANUP: init: remove useless test against MAX_THREADS in affinity loop The test i < MAX_THREADS is pointless since the loop boundary is bound to global.nbthread which is already not greater. --- src/haproxy.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/haproxy.c b/src/haproxy.c index a114ff97c1..e7dd2407f1 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@ -3423,8 +3423,7 @@ int main(int argc, char **argv) if (ha_cpuset_count(&cpu_map.proc)) ha_cpuset_and(&cpu_map.thread[i], &cpu_map.proc); - if (i < MAX_THREADS && /* only the first 32/64 threads may be pinned */ - ha_cpuset_count(&cpu_map.thread[i])) {/* only do this if the thread has a THREAD map */ + if (ha_cpuset_count(&cpu_map.thread[i])) {/* only do this if the thread has a THREAD map */ #if defined(__APPLE__) int j; unsigned long set = cpu_map.thread[i].cpuset; -- 2.47.3