[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1510543145-111658-1-git-send-email-jianjian.wang1@gmail.com>
Date: Mon, 13 Nov 2017 03:19:05 +0000
From: Jian Wang <jianjian.wang1@...il.com>
To: "David S . Miller" <davem@...emloft.net>,
Gustavo <garsilva@...eddedor.com>
Cc: netdev@...r.kernel.org, Jian Wang <jianjian.wang1@...il.com>
Subject: [PATCH 1/1] net: ipv4: use BUG_ON instead of condition followed by BUG
Signed-off-by: Jian Wang <jianjian.wang1@...il.com>
---
net/ipv4/ip_output.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
index e8e675b..1a53553 100644
--- a/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@ -769,8 +769,8 @@ int ip_do_fragment(struct net *net, struct sock *sk, struct sk_buff *skb,
/*
* Copy a block of the IP datagram.
*/
- if (skb_copy_bits(skb, ptr, skb_transport_header(skb2), len))
- BUG();
+ BUG_ON(skb_copy_bits(skb, ptr, skb_transport_header(skb2), len));
+
left -= len;
/*
--
2.7.4
Powered by blists - more mailing lists