mirror of
https://github.com/haproxy/haproxy.git
synced 2026-04-15 21:59:41 -04: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
1 changed files with 7 additions and 0 deletions
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 a new issue