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.
This commit is contained in:
Tim Duesterhus 2021-09-15 13:58:48 +02:00 committed by Willy Tarreau
parent 63ee0e4c01
commit 02fa646a37

View File

@ -0,0 +1,7 @@
@@
expression E;
@@
- if (E)
- ABORT_NOW();
+ BUG_ON(E);