mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* signal.c: convert assertion to BUG_ON()
@ 2004-12-25 17:29 Pavel Machek
  2004-12-25 20:25 ` Olaf Titz
  0 siblings, 1 reply; 2+ messages in thread
From: Pavel Machek @ 2004-12-25 17:29 UTC (permalink / raw)
  To: Rusty trivial patch monkey Russell, Andrew Morton, kernel list

Hi!

Convert assertion code to BUG_ON(). Please apply,
								Pavel

Signed-off-by: Pavel Machek <pavel@suse.cz>

--- clean-cvs/kernel/signal.c	2004-11-19 12:21:32.000000000 +0100
+++ linux-cvs/kernel/signal.c	2004-12-10 22:35:59.000000000 +0100
@@ -1442,8 +1442,7 @@
 	unsigned long flags;
 	struct sighand_struct *psig;
 
-	if (sig == -1)
-		BUG();
+	BUG_ON(sig == -1);
 
  	/* do_notify_parent_cldstop should have been called instead.  */
  	BUG_ON(tsk->state & (TASK_STOPPED|TASK_TRACED));


-- 
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: signal.c: convert assertion to BUG_ON()
  2004-12-25 17:29 signal.c: convert assertion to BUG_ON() Pavel Machek
@ 2004-12-25 20:25 ` Olaf Titz
  0 siblings, 0 replies; 2+ messages in thread
From: Olaf Titz @ 2004-12-25 20:25 UTC (permalink / raw)
  To: linux-kernel

> -	if (sig == -1)
> -		BUG();
> +	BUG_ON(sig == -1);

Can sig be < -1? If not, this should probably be BUG_ON(sig < 0)
(common defensive coding rule...)

Olaf


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-12-25 20:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-25 17:29 signal.c: convert assertion to BUG_ON() Pavel Machek
2004-12-25 20:25 ` Olaf Titz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®