Skip to content

Commit

Permalink
BUG_ON() Conversion in kernel/signal.c
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Eric Sesterhenn authored and Adrian Bunk committed Apr 2, 2006
1 parent 524223c commit fda8bd7
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit fda8bd7

Please sign in to comment.