@@ -577,8 +577,7 @@ __build_packet_message(struct nfnl_log_net *log,
nla->nla_type = NFULA_PAYLOAD;
nla->nla_len = size;
- if (skb_copy_bits(skb, 0, nla_data(nla), data_len))
- BUG();
+ BUG_ON(skb_copy_bits(skb, 0, nla_data(nla), data_len));
}
nlh->nlmsg_len = inst->skb->tail - old_tail;
@@ -38,8 +38,7 @@ static bool u32_match_it(const struct xt_u32 *data,
if (skb->len < 4 || pos > skb->len - 4)
return false;
- if (skb_copy_bits(skb, pos, &n, sizeof(n)) < 0)
- BUG();
+ BUG_ON(skb_copy_bits(skb, pos, &n, sizeof(n)) < 0);
val = ntohl(n);
nnums = ct->nnums;
@@ -65,9 +64,8 @@ static bool u32_match_it(const struct xt_u32 *data,
pos > skb->len - at - 4)
return false;
- if (skb_copy_bits(skb, at + pos, &n,
- sizeof(n)) < 0)
- BUG();
+ BUG_ON(skb_copy_bits(skb, at + pos, &n,
+ sizeof(n)) < 0);
val = ntohl(n);
break;
}
Signed-off-by: Fabian Frederick <fabf@skynet.be> --- net/netfilter/nfnetlink_log.c | 3 +-- net/netfilter/xt_u32.c | 8 +++----- 2 files changed, 4 insertions(+), 7 deletions(-)