diff options
author | Julia Lawall <julia@diku.dk> | 2008-03-04 15:21:05 -0800 |
---|---|---|
committer | Mark Fasheh <mfasheh@suse.com> | 2008-04-18 08:56:11 -0700 |
commit | b1f3550fa1471b691ad6c2f35b5b22e93eaa5855 (patch) | |
tree | 0d481a71d202883df116c55fdac4a4a60c4ca091 /fs/afs/flock.c | |
parent | c9ec14884d69a303eef4faae42bd3c4e25b19941 (diff) |
ocfs2: 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: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Diffstat (limited to 'fs/afs/flock.c')
0 files changed, 0 insertions, 0 deletions