BUG_ON() Conversion in kernel/signal.c
authorEric Sesterhenn <snakebyte@gmx.de>
Sun, 2 Apr 2006 11:44:47 +0000 (13:44 +0200)
committerAdrian Bunk <bunk@stusta.de>
Sun, 2 Apr 2006 11:44:47 +0000 (13:44 +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>
kernel/signal.c

index 92025b10879194d2028944a7076d31757463e0b0..5ccaac505e8dabd792eab331cf4e80bfa9a5f4cf 100644 (file)
@@ -769,8 +769,7 @@ specific_send_sig_info(int sig, struct siginfo *info, struct task_struct *t)
 {
        int ret = 0;
 
-       if (!irqs_disabled())
-               BUG();
+       BUG_ON(!irqs_disabled());
        assert_spin_locked(&t->sighand->siglock);
 
        /* Short-circuit ignored signals.  */
@@ -1384,8 +1383,7 @@ send_group_sigqueue(int sig, struct sigqueue *q, struct task_struct *p)
                 * the overrun count.  Other uses should not try to
                 * send the signal multiple times.
                 */
-               if (q->info.si_code != SI_TIMER)
-                       BUG();
+               BUG_ON(q->info.si_code != SI_TIMER);
                q->info.si_overrun++;
                goto out;
        }