]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: config: .if/.elif should also accept negative integers
authorWilly Tarreau <w@1wt.eu>
Thu, 6 May 2021 05:52:50 +0000 (07:52 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 6 May 2021 08:35:03 +0000 (10:35 +0200)
commit71990e6becb0d448915e453e4ce17dde67b8563b
tree3154d64b93bd3b631e078e859b249afe47d73ae9
parentf67ff020720dc403fcf65b0b2807b27a215c42cf
BUG/MINOR: config: .if/.elif should also accept negative integers

The doc about .if/.elif config block conditions says:

  a non-nul integer (e.g. '1'), always returns "true"

So we must accept negative integers as well. The test was made on
atoi() > 0.

No backport is needed, this is only 2.4.
src/cfgparse.c