diff options
author | Eric Sesterhenn <snakebyte@gmx.de> | 2006-04-01 01:20:23 +0200 |
---|---|---|
committer | Adrian Bunk <bunk@stusta.de> | 2006-04-01 01:20:23 +0200 |
commit | 9bc98fc6fd3d07f37b597601489df200e0024222 (patch) | |
tree | 06242303dc70efbeda901e9d0ca3a7067976a501 /ipc | |
parent | 99cee0cd7560fc4e7f3646ee18d90e328bd1cb32 (diff) | |
download | kernel_samsung_tuna-9bc98fc6fd3d07f37b597601489df200e0024222.zip kernel_samsung_tuna-9bc98fc6fd3d07f37b597601489df200e0024222.tar.gz kernel_samsung_tuna-9bc98fc6fd3d07f37b597601489df200e0024222.tar.bz2 |
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 <snakebyte@gmx.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Diffstat (limited to 'ipc')
-rw-r--r-- | ipc/util.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -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) { |