]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUILD: debug: make sure debug macros are never empty
authorWilly Tarreau <w@1wt.eu>
Wed, 31 Aug 2022 08:52:25 +0000 (10:52 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 31 Aug 2022 08:53:53 +0000 (10:53 +0200)
commitd8009a1ca6607bfe08978476ae2c77679b2b5453
tree610f66a600159e355016d3a1413c2117e56527f4
parent3ff96103569d911f264563207d1825ad5b6d5616
BUILD: debug: make sure debug macros are never empty

As outlined in commit f7ebe584d7 ("BUILD: debug: Add braces to if
statement calling only CHECK_IF()"), the BUG_ON() family of macros
is incorrectly defined to be empty when debugging is disabled, and
that can lead to trouble. Make sure they always fall back to the
usual "do { } while (0)". This may be backported to 2.6 if needed,
though no such issue was met there to date.
include/haproxy/bug.h