]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
BUG_ON() Conversion in ipc/sem.c
authorEric Sesterhenn <snakebyte@gmx.de>
Sun, 26 Mar 2006 16:28:38 +0000 (18:28 +0200)
committerAdrian Bunk <bunk@stusta.de>
Sun, 26 Mar 2006 16:28:38 +0000 (18:28 +0200)
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>
ipc/sem.c

index 59696a840be1107d83ef9ae15513583e8f8077f8..18a78fe9c55b4f2a858a84f817252d7180d922f4 100644 (file)
--- 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;
        }