]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: ncbuf: use standard BUG_ON with DEBUG_STRICT
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Mon, 28 Nov 2022 14:10:30 +0000 (15:10 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 29 Nov 2022 14:15:27 +0000 (15:15 +0100)
ncbuf can be compiled for haproxy or standalone to run unit test suite.
For the latest mode, BUG_ON() macro has been re-implemented in a simple
version.

The inclusion of the default or the redefined macro relied on DEBUG_DEV.
Change this to now rely on DEBUG_STRICT as this is activated for the
default build.

This change is safe as only BUG_ON_HOT() macro is used in ncbuf code,
which is activated only with the default value DEBUG_STRICT=2.

This should be backported up to 2.6.

src/ncbuf.c

index 5b661f4c4bf1d431c09148a0e3870af24aca5ea0..a96cf598ed7d2fa5ecde2f1ba4e1a362d3dca26d 100644 (file)
@@ -15,7 +15,7 @@
 #include <haproxy/list.h>
 #endif /* STANDALONE */
 
-#ifdef DEBUG_DEV
+#ifdef DEBUG_STRICT
 # include <haproxy/bug.h>
 #else
 # include <stdio.h>