dect
/
linux-2.6
Archived
13
0
Fork 0

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>
This commit is contained in:
Eric Sesterhenn 2006-03-26 18:28:38 +02:00 committed by Adrian Bunk
parent 309be53da6
commit 27315c96a4
1 changed files with 2 additions and 4 deletions

View File

@ -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;
}