]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: init: remove useless test against MAX_THREADS in affinity loop
authorWilly Tarreau <w@1wt.eu>
Tue, 28 Sep 2021 07:56:44 +0000 (09:56 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 28 Sep 2021 07:56:44 +0000 (09:56 +0200)
The test i < MAX_THREADS is pointless since the loop boundary is bound
to global.nbthread which is already not greater.

src/haproxy.c

index a114ff97c19d2438f1b762e81e6f2a0296883cfd..e7dd2407f187af778a2380ea3692c8bb89e0fa1e 100644 (file)
@@ -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;