Skip to content

Commit

Permalink
ipv6: Use BUG_ON
Browse files Browse the repository at this point in the history
The semantic patch that makes this transformation is as follows:

// <smpl>
@@ expression e; @@
-if (e) BUG();
+BUG_ON(e);
// </smpl>

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Himangi Saraogi authored and David S. Miller committed Jul 11, 2014
1 parent 8242fc3 commit e3f0b86
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/ipv6/ip6_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -801,8 +801,8 @@ int ip6_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *))
/*
* Copy a block of the IP datagram.
*/
if (skb_copy_bits(skb, ptr, skb_transport_header(frag), len))
BUG();
BUG_ON(skb_copy_bits(skb, ptr, skb_transport_header(frag),
len));
left -= len;

fh->frag_off = htons(offset);
Expand Down

0 comments on commit e3f0b86

Please sign in to comment.