]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: sample: fix the comment regarding the range of the thread sample fetch
authorWilly Tarreau <w@1wt.eu>
Tue, 14 Apr 2026 14:58:53 +0000 (16:58 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 14 Apr 2026 14:59:56 +0000 (16:59 +0200)
The comment says "between 1 and nbthread" while it's in fact between 0 and
nbthread-1 and this is also documented like this in the config manual. No
backport needed though it cannot hurt.

src/sample.c

index 6765cbc0fc121d87e9f7e59e17e976867ed45601..902db705646f25d92fd996bc81e43beea3349ae9 100644 (file)
@@ -5062,7 +5062,7 @@ smp_fetch_pid(const struct arg *args, struct sample *smp, const char *kw, void *
 }
 
 
-/* returns the number of the current process (between 1 and nbproc */
+/* returns the number of the current process (between 1 and nbproc) */
 static int
 smp_fetch_proc(const struct arg *args, struct sample *smp, const char *kw, void *private)
 {
@@ -5071,7 +5071,7 @@ smp_fetch_proc(const struct arg *args, struct sample *smp, const char *kw, void
        return 1;
 }
 
-/* returns the number of the current thread (between 1 and nbthread */
+/* returns the number of the current thread (between 0 and nbthread-1) */
 static int
 smp_fetch_thread(const struct arg *args, struct sample *smp, const char *kw, void *private)
 {