[NET]: Change some "if (x) BUG();" to "BUG_ON(x);"
This changes some simple "if (x) BUG();" statements to "BUG_ON(x);" Signed-off-by: Kris Katterjohn <kjak@users.sourceforge.net> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
4bba392592
commit
09a626600b
@@ -1092,15 +1092,12 @@ int skb_checksum_help(struct sk_buff *skb, int inward)
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (offset > (int)skb->len)
|
||||
BUG();
|
||||
BUG_ON(offset > (int)skb->len);
|
||||
csum = skb_checksum(skb, offset, skb->len-offset, 0);
|
||||
|
||||
offset = skb->tail - skb->h.raw;
|
||||
if (offset <= 0)
|
||||
BUG();
|
||||
if (skb->csum + 2 > offset)
|
||||
BUG();
|
||||
BUG_ON(offset <= 0);
|
||||
BUG_ON(skb->csum + 2 > offset);
|
||||
|
||||
*(u16*)(skb->h.raw + skb->csum) = csum_fold(csum);
|
||||
skb->ip_summed = CHECKSUM_NONE;
|
||||
|
Reference in New Issue
Block a user