haproxy/dev/coccinelle/bug_on.cocci
Tim Duesterhus 02fa646a37 DEV: coccinelle: Add bug_on.cocci
This replaces an if + ABORT_NOW() by BUG_ON(). It might change behavior,
because BUG_ON will result in a no-op if not enabled.
2021-09-17 17:22:05 +02:00

8 lines
58 B
Plaintext

@@
expression E;
@@
- if (E)
- ABORT_NOW();
+ BUG_ON(E);