mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-22 12:30:07 +00: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…
Reference in New Issue
Block a user