net: ipv6: Use BUG_ON
Subsystems (2)
PATCH 1/1 net: ipv6: Use BUG_ON
The semantic patch that makes the transformation is as follows:
// <smpl>
@@ expression e; @@
-if (e) BUG();
+BUG_ON(e);
// </smpl>
Signed-off-by Himangi Saraogi <[email protected]>
Acked-by Julia Lawall <[email protected]>
---
To send to: "David S. Miller" <[email protected]>,Alexey Kuznetsov <[email protected]>,James Morris <[email protected]>,Hideaki YOSHIFUJI <[email protected]>,Patrick McHardy <[email protected]>,[email protected],[email protected]
net/ipv6/raw.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
net/ipv6/raw.c +2 -4
@@ -588,8 +588,7 @@ static int rawv6_push_pending_frames(struct sock *sk, struct flowi6 *fl6, } offset +=skb_transport_offset (skb); -if (skb_copy_bits (skb, offset, &csum,2 )) -BUG (); +BUG_ON (skb_copy_bits (skb, offset, &csum,2 ));/* in case cksum was not initialized */ if (unlikely (csum))
@@ -601,8 +600,7 @@ static int rawv6_push_pending_frames(struct sock *sk, struct flowi6 *fl6,if (csum ==0 && fl6->flowi6_proto ==IPPROTO_UDP ) csum =CSUM_MANGLED_0 ; -if (skb_store_bits (skb, offset, &csum,2 )) -BUG (); +BUG_ON (skb_store_bits (skb, offset, &csum,2 )); send: err =ip6_push_pending_frames (sk);
Signature · 1 line
1.9.1
From: Himangi Saraogi <[email protected]>
Date: Sat, 12 Jul 2014 01:55:38 +0530
Quoted 10 lines
The semantic patch that makes the transformation is as follows:
// <smpl>
@@ expression e; @@(quoted diff) +1
-1-if (e) BUG(); +BUG_ON(e);// </smpl>
Signed-off-by Himangi Saraogi <[email protected]>Acked-by Julia Lawall <[email protected]>
Applied.