CLEANUP: debug: make the BUG_ON() macros check the condition in the outer one
authorWilly Tarreau <w@1wt.eu>
Mon, 21 Oct 2024 16:17:25 +0000 (18:17 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 9 Jan 2025 09:28:05 +0000 (10:28 +0100)
commitecfa28ebf68f280655915fea5993bb913e11e24a
treeab6d088f0526a7d9b96f48d191924975980ca614
parentea911d1a52ca53cfc5d9cf0638b8df6ae6da3d1c
CLEANUP: debug: make the BUG_ON() macros check the condition in the outer one

The BUG_ON() macros are made of two levels so as to resolve the condition
to a string. However this doesn't offer much flexibility for performing
other operations when the condition is validated, so let's adjust them so
that the condition is checked in the outer macro and the operations are
performed in the inner one.

(cherry picked from commit 8844ed2009563d5976c42b6b2b7eb8f097344f25)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
include/haproxy/bug.h