mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
[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:
parent
4bba392592
commit
09a626600b
11 changed files with 21 additions and 40 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue