Commit 265ec7b0 authored by Jeremy Sowden's avatar Jeremy Sowden Committed by Pablo Neira Ayuso

netfilter: bitwise: remove NULL comparisons from attribute checks.

In later patches, we will be adding more checks.  In order to be
consistent and prevent complaints from checkpatch.pl, replace the
existing comparisons with NULL with logical NOT operators.
Signed-off-by: default avatarJeremy Sowden <jeremy@azazel.net>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent fbf19ddf
...@@ -52,11 +52,11 @@ static int nft_bitwise_init(const struct nft_ctx *ctx, ...@@ -52,11 +52,11 @@ static int nft_bitwise_init(const struct nft_ctx *ctx,
u32 len; u32 len;
int err; int err;
if (tb[NFTA_BITWISE_SREG] == NULL || if (!tb[NFTA_BITWISE_SREG] ||
tb[NFTA_BITWISE_DREG] == NULL || !tb[NFTA_BITWISE_DREG] ||
tb[NFTA_BITWISE_LEN] == NULL || !tb[NFTA_BITWISE_LEN] ||
tb[NFTA_BITWISE_MASK] == NULL || !tb[NFTA_BITWISE_MASK] ||
tb[NFTA_BITWISE_XOR] == NULL) !tb[NFTA_BITWISE_XOR])
return -EINVAL; return -EINVAL;
err = nft_parse_u32_check(tb[NFTA_BITWISE_LEN], U8_MAX, &len); err = nft_parse_u32_check(tb[NFTA_BITWISE_LEN], U8_MAX, &len);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment