summaryrefslogtreecommitdiff
path: root/ipc
diff options
context:
space:
mode:
authorEric Sesterhenn <snakebyte@gmx.de>2006-03-26 18:28:38 +0200
committerAdrian Bunk <bunk@stusta.de>2006-03-26 18:28:38 +0200
commit27315c96a4c3d5f24a902111dae537cdc28302e4 (patch)
tree15a37bd0b596fd5eb4d026df309ee6458f6049fd /ipc
parent309be53da60dc24b73f3f0bceab8f0707c05371f (diff)
downloadlinux-next-27315c96a4c3d5f24a902111dae537cdc28302e4.tar.gz
BUG_ON() Conversion in ipc/sem.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/sem.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/ipc/sem.c b/ipc/sem.c
index 59696a840be1..18a78fe9c55b 100644
--- a/ipc/sem.c
+++ b/ipc/sem.c
@@ -227,8 +227,7 @@ asmlinkage long sys_semget (key_t key, int nsems, int semflg)
err = -EEXIST;
} else {
sma = sem_lock(id);
- if(sma==NULL)
- BUG();
+ BUG_ON(sma==NULL);
if (nsems > sma->sem_nsems)
err = -EINVAL;
else if (ipcperms(&sma->sem_perm, semflg))
@@ -1181,8 +1180,7 @@ retry_undos:
sma = sem_lock(semid);
if(sma==NULL) {
- if(queue.prev != NULL)
- BUG();
+ BUG_ON(queue.prev != NULL);
error = -EIDRM;
goto out_free;
}