Thread (16 messages) 16 messages, 5 authors, 2015-04-03

Re: [PATCH 4/9 net-next] ipv6: replace if/BUG by BUG_ON

From: David Miller <davem@davemloft.net>
Date: 2015-03-31 15:18:11
Also in: lkml, netfilter-devel

From: YOSHIFUJI Hideaki <redacted>
Date: Tue, 31 Mar 2015 12:50:27 +0900
Hi,

Fabian Frederick wrote:
quoted
Signed-off-by: Fabian Frederick <redacted>
---
 net/ipv6/addrconf.c                     | 3 +--
 net/ipv6/esp6.c                         | 3 +--
 net/ipv6/netfilter/nf_conntrack_reasm.c | 3 +--
 3 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 2660263..e205918 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -4805,8 +4805,7 @@ static int inet6_set_link_af(struct net_device *dev, const struct nlattr *nla)
 	if (!idev)
 		return -EAFNOSUPPORT;
 
-	if (nla_parse_nested(tb, IFLA_INET6_MAX, nla, NULL) < 0)
-		BUG();
+	BUG_ON(nla_parse_nested(tb, IFLA_INET6_MAX, nla, NULL) < 0);
 
NACK, I do not prefer using BUG_ON() with side effects.
Agreed, I do not like these changes at all and will not be
applying them.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help