BUG_ON() Conversion in ipc/msg.c
authorEric Sesterhenn <snakebyte@gmx.de>
Fri, 24 Mar 2006 17:44:22 +0000 (18:44 +0100)
committerAdrian Bunk <bunk@stusta.de>
Fri, 24 Mar 2006 17:44:22 +0000 (18:44 +0100)
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/msg.c

index fbf757064a328a11ea100b2975a6ef180430502c..60c1e5c23418116326fdd36bd05c5b65cd93643c 100644 (file)
--- a/ipc/msg.c
+++ b/ipc/msg.c
@@ -220,8 +220,7 @@ asmlinkage long sys_msgget (key_t key, int msgflg)
                ret = -EEXIST;
        } else {
                msq = msg_lock(id);
-               if(msq==NULL)
-                       BUG();
+               BUG_ON(msq==NULL);
                if (ipcperms(&msq->q_perm, msgflg))
                        ret = -EACCES;
                else {