Skip to contentSkip to conversation

BUG_ON() Conversion in ipc/msg.c

PATCH New Eric Sesterhenn / snakebyte 1 participant 1 message Jan 27, 2006 Kernel janitors

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 BUG_ON() Conversion in ipc/msg.c

hi,

this changes if() BUG(); constructs to BUG_ON() which is cleaner, contains unlikely() and can better optimized away.

ipc/msg.c renamed from ipc/msg.c.orig +1 -2
@@ -220,8 +220,7 @@ asmlinkage long sys_msgget (key_t key, i
 		ret = -EEXIST;
 	} else {
 		msq = msg_lock(id);
-		if(msq==NULL)
-			BUG();
+		BUG_ON(msq==NULL);
 		if (ipcperms(&msq->q_perm, msgflg))
 			ret = -EACCES;
 		else {

_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors