diff options
author | Julia Lawall <julia@diku.dk> | 2008-02-18 03:42:53 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-02-18 03:42:53 +0100 |
commit | d6584f3a08055688b2344eb26379fb2f3147ce91 (patch) | |
tree | f934b427af15b1ea532d333427c905207be7f129 /Documentation/networking | |
parent | net/rxrpc: Use BUG_ON (diff) | |
download | linux-d6584f3a08055688b2344eb26379fb2f3147ce91.tar.xz linux-d6584f3a08055688b2344eb26379fb2f3147ce91.zip |
net/9p/trans_virtio.c: Use BUG_ON
if (...) BUG(); should be replaced with BUG_ON(...) when the test has no
side-effects to allow a definition of BUG_ON that drops the code completely.
The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// <smpl>
@ disable unlikely @ expression E,f; @@
(
if (<... f(...) ...>) { BUG(); }
|
- if (unlikely(E)) { BUG(); }
+ BUG_ON(E);
)
@@ expression E,f; @@
(
if (<... f(...) ...>) { BUG(); }
|
- if (E) { BUG(); }
+ BUG_ON(E);
)
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'Documentation/networking')
0 files changed, 0 insertions, 0 deletions