]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: threads: fix the process range of thread masks
authorWilly Tarreau <w@1wt.eu>
Sat, 2 Feb 2019 12:18:01 +0000 (13:18 +0100)
committerWilly Tarreau <w@1wt.eu>
Sat, 2 Feb 2019 12:18:01 +0000 (13:18 +0100)
Commit 421f02e ("MINOR: threads: add a MAX_THREADS define instead of
LONGBITS") used a MAX_THREADS macros to fix threads limits. However,
one change was wrong as it affected the upper bound of the process
loop when setting threads masks. No backport is needed.

src/listener.c

index 553607af7621e7d7bd5a3d3ef3ce2541e45b8f03..40419d5625e13bd2f8b1474ca76ae40ee5087ef9 100644 (file)
@@ -979,7 +979,7 @@ static int bind_parse_process(char **args, int cur_arg, struct proxy *px, struct
 
        conf->bind_proc |= proc;
        if (thread) {
-               for (i = 0; i < MAX_THREADS; i++)
+               for (i = 0; i < LONGBITS; i++)
                        if (!proc || (proc & (1UL << i)))
                                conf->bind_thread[i] |= thread;
        }