public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Rolf Eike Beer <eike-kernel@sf-tec.de>
To: linux-kernel@vger.kernel.org
Cc: Linus Torvalds <torvalds@osdl.org>
Subject: [PATCH] if(foo) BUG() -> BUG_ON(foo) for include/net/
Date: Wed, 24 Sep 2003 12:34:58 +0200	[thread overview]
Message-ID: <200309241234.58125@bilbo.math.uni-mannheim.de> (raw)
In-Reply-To: <200309241233.09877@bilbo.math.uni-mannheim.de>

diff -aur linux-2.6.0-test5-bk6/include/net/sctp/sm.h linux-2.6.0-test5-bk6-caliban/include/net/sctp/sm.h
--- linux-2.6.0-test5-bk6/include/net/sctp/sm.h	2003-09-11 10:17:55.000000000 +0200
+++ linux-2.6.0-test5-bk6-caliban/include/net/sctp/sm.h	2003-09-11 10:26:39.000000000 +0200
@@ -428,8 +428,7 @@
 /* Run sctp_add_cmd() generating a BUG() if there is a failure.  */
 static inline void sctp_add_cmd_sf(sctp_cmd_seq_t *seq, sctp_verb_t verb, sctp_arg_t obj)
 {
-	if (unlikely(!sctp_add_cmd(seq, verb, obj)))
-		BUG();
+	BUG_ON(!sctp_add_cmd(seq, verb, obj));
 }
 
 /* Check VTAG of the packet matches the sender's own tag OR its peer's
diff -aur linux-2.6.0-test5-bk6/include/net/sock.h linux-2.6.0-test5-bk6-caliban/include/net/sock.h
--- linux-2.6.0-test5-bk6/include/net/sock.h	2003-09-11 10:17:55.000000000 +0200
+++ linux-2.6.0-test5-bk6-caliban/include/net/sock.h	2003-09-11 10:30:16.000000000 +0200
@@ -455,8 +455,8 @@
 	 * change the ownership of this struct sock, with one not needed
 	 * transient sk_set_owner call.
 	 */
-	if (unlikely(sk->sk_owner != NULL))
-		BUG();
+	BUG_ON(sk->sk_owner != NULL);
+
 	sk->sk_owner = owner;
 	__module_get(owner);
 }
diff -aur linux-2.6.0-test5-bk6/include/net/tcp.h linux-2.6.0-test5-bk6-caliban/include/net/tcp.h
--- linux-2.6.0-test5-bk6/include/net/tcp.h	2003-09-11 10:17:55.000000000 +0200
+++ linux-2.6.0-test5-bk6-caliban/include/net/tcp.h	2003-09-11 10:26:39.000000000 +0200
@@ -1424,7 +1424,7 @@
 		if (tp->ucopy.memory > sk->sk_rcvbuf) {
 			struct sk_buff *skb1;
 
-			if (sock_owned_by_user(sk)) BUG();
+			BUG_ON(sock_owned_by_user(sk));
 
 			while ((skb1 = __skb_dequeue(&tp->ucopy.prequeue)) != NULL) {
 				sk->sk_backlog_rcv(sk, skb1);

  reply	other threads:[~2003-09-24 10:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-24 10:33 [PATCH] if(foo) BUG() -> BUG_ON(foo) for include/rxrpc/ Rolf Eike Beer
2003-09-24 10:34 ` Rolf Eike Beer [this message]
2003-09-24 10:36   ` [PATCH] if(foo) BUG() -> BUG_ON(foo) for include/linux/ Rolf Eike Beer
2003-09-24 10:52     ` [PATCH] if(foo) BUG() -> BUG_ON(foo) for include/arch/ Rolf Eike Beer
2003-10-03 22:11       ` Randy.Dunlap

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200309241234.58125@bilbo.math.uni-mannheim.de \
    --to=eike-kernel@sf-tec.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox