demos/janitorings/BUG_ON.cocci
raw| 1 | // is also mega10.cocci |
| 2 | |
| 3 | |
| 4 | @@ expression E; @@ |
| 5 | |
| 6 | // super unreadable, but we don't want the isomorphism to apply, because then |
| 7 | // two bindings of E drift up to the top |
| 8 | |
| 9 | - if (unlikely( |
| 10 | + BUG_ON( |
| 11 | E |
| 12 | + ); |
| 13 | - )) { BUG(); } |
| 14 | |
| 15 | @@ expression E; @@ |
| 16 | |
| 17 | - if (E) { BUG(); } |
| 18 | + BUG_ON(E); |