Messages in this thread Patch in this message | | | From | Rolf Eike Beer <> | Subject | [PATCH] if(foo) BUG() -> BUG_ON(foo) for include/net/ | Date | Wed, 24 Sep 2003 12:34:58 +0200 |
| |
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); - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |