From: Eric Sesterhenn Date: Fri, 31 Mar 2006 23:20:23 +0000 (+0200) Subject: BUG_ON() Conversion in ipc/util.c X-Git-Tag: v2.6.17-rc1~10^2~35 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9bc98fc6fd3d07f37b597601489df200e0024222;p=linux-2.6 BUG_ON() Conversion in ipc/util.c this changes if() BUG(); constructs to BUG_ON() which is cleaner, contains unlikely() and can better optimized away. Signed-off-by: Eric Sesterhenn Signed-off-by: Adrian Bunk --- diff --git a/ipc/util.c b/ipc/util.c index 23151ef325..5e785a29e1 100644 --- a/ipc/util.c +++ b/ipc/util.c @@ -266,8 +266,7 @@ struct kern_ipc_perm* ipc_rmid(struct ipc_ids* ids, int id) { struct kern_ipc_perm* p; int lid = id % SEQ_MULTIPLIER; - if(lid >= ids->entries->size) - BUG(); + BUG_ON(lid >= ids->entries->size); /* * do not need a rcu_dereference()() here to force ordering @@ -275,8 +274,7 @@ struct kern_ipc_perm* ipc_rmid(struct ipc_ids* ids, int id) */ p = ids->entries->p[lid]; ids->entries->p[lid] = NULL; - if(p==NULL) - BUG(); + BUG_ON(p==NULL); ids->in_use--; if (lid == ids->max_id) {