Btrfs: use BUG_ON

Use BUG_ON(x) rather than if(x) BUG();

The semantic patch that fixes this problem is as follows:

// <smpl>
@@ identifier x; @@
-if (x) BUG();
+BUG_ON(x);
// </smpl>

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Chris Mason <clm@fb.com>
This commit is contained in:
HIMANGI SARAOGI 2014-07-09 03:51:41 +05:30 committed by Chris Mason
parent 7880991344
commit 14586651ed
1 changed files with 2 additions and 2 deletions

View File

@ -2677,8 +2677,8 @@ again:
found_key.offset); found_key.offset);
if (ret == -ENOSPC) if (ret == -ENOSPC)
failed++; failed++;
else if (ret) else
BUG(); BUG_ON(ret);
} }
if (found_key.offset == 0) if (found_key.offset == 0)