提交 8242fc33 编写于 作者: H Himangi Saraogi 提交者: David S. Miller

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: NHimangi Saraogi <himangi774@gmail.com>
Acked-by: NJulia Lawall <julia.lawall@lip6.fr>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 bc91b0f0
...@@ -588,8 +588,7 @@ static int rawv6_push_pending_frames(struct sock *sk, struct flowi6 *fl6, ...@@ -588,8 +588,7 @@ static int rawv6_push_pending_frames(struct sock *sk, struct flowi6 *fl6,
} }
offset += skb_transport_offset(skb); offset += skb_transport_offset(skb);
if (skb_copy_bits(skb, offset, &csum, 2)) BUG_ON(skb_copy_bits(skb, offset, &csum, 2));
BUG();
/* in case cksum was not initialized */ /* in case cksum was not initialized */
if (unlikely(csum)) if (unlikely(csum))
...@@ -601,8 +600,7 @@ static int rawv6_push_pending_frames(struct sock *sk, struct flowi6 *fl6, ...@@ -601,8 +600,7 @@ static int rawv6_push_pending_frames(struct sock *sk, struct flowi6 *fl6,
if (csum == 0 && fl6->flowi6_proto == IPPROTO_UDP) if (csum == 0 && fl6->flowi6_proto == IPPROTO_UDP)
csum = CSUM_MANGLED_0; csum = CSUM_MANGLED_0;
if (skb_store_bits(skb, offset, &csum, 2)) BUG_ON(skb_store_bits(skb, offset, &csum, 2));
BUG();
send: send:
err = ip6_push_pending_frames(sk); err = ip6_push_pending_frames(sk);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册