BUG_ON() Conversion in ipc/sem.c
PATCH 2/4 BUG_ON() Conversion in ipc/sem.c
hi,
this changes if() BUG(); constructs to BUG_ON() which is cleaner, contains unlikely() and can better optimized away.
Signed-off-by Eric Sesterhenn <[email protected]>
ipc/sem.c renamed from ipc/sem.c.orig +2 -4
@@ -227,8 +227,7 @@ asmlinkage long sys_semget (key_t key, i 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))
@@ -1182,8 +1181,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; }
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors