aboutsummaryrefslogtreecommitdiffstats
path: root/ipc/sem.c
diff options
context:
space:
mode:
authorEric Sesterhenn <snakebyte@gmx.de>2006-03-26 11:28:38 -0500
committerAdrian Bunk <bunk@stusta.de>2006-03-26 11:28:38 -0500
commit27315c96a4c3d5f24a902111dae537cdc28302e4 (patch)
tree15a37bd0b596fd5eb4d026df309ee6458f6049fd /ipc/sem.c
parent309be53da60dc24b73f3f0bceab8f0707c05371f (diff)
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/sem.c')
-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)
227 err = -EEXIST; 227 err = -EEXIST;
228 } else { 228 } else {
229 sma = sem_lock(id); 229 sma = sem_lock(id);
230 if(sma==NULL) 230 BUG_ON(sma==NULL);
231 BUG();
232 if (nsems > sma->sem_nsems) 231 if (nsems > sma->sem_nsems)
233 err = -EINVAL; 232 err = -EINVAL;
234 else if (ipcperms(&sma->sem_perm, semflg)) 233 else if (ipcperms(&sma->sem_perm, semflg))
@@ -1181,8 +1180,7 @@ retry_undos:
1181 1180
1182 sma = sem_lock(semid); 1181 sma = sem_lock(semid);
1183 if(sma==NULL) { 1182 if(sma==NULL) {
1184 if(queue.prev != NULL) 1183 BUG_ON(queue.prev != NULL);
1185 BUG();
1186 error = -EIDRM; 1184 error = -EIDRM;
1187 goto out_free; 1185 goto out_free;
1188 } 1186 }