mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-11-08 12:31:21 +01:00
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:
parent
63ee0e4c01
commit
02fa646a37
7
dev/coccinelle/bug_on.cocci
Normal file
7
dev/coccinelle/bug_on.cocci
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
@@
|
||||||
|
expression E;
|
||||||
|
@@
|
||||||
|
|
||||||
|
- if (E)
|
||||||
|
- ABORT_NOW();
|
||||||
|
+ BUG_ON(E);
|
||||||
Loading…
x
Reference in New Issue
Block a user