diff options
author | Jeremy Sowden <jeremy@azazel.net> | 2020-01-15 20:05:49 +0000 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2020-01-16 15:51:56 +0100 |
commit | 265ec7b0e8c35ea70e694da43aa8896e2614def9 (patch) | |
tree | f6a1c89a657cc4c475503b85fdb98852cefd1518 /net/netfilter/nft_bitwise.c | |
parent | fbf19ddf396b3526718a64e24ace316c64d3ed1f (diff) |
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: Jeremy Sowden <jeremy@azazel.net>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter/nft_bitwise.c')
-rw-r--r-- | net/netfilter/nft_bitwise.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/netfilter/nft_bitwise.c b/net/netfilter/nft_bitwise.c index e8ca1ec105f8..85605fb1e360 100644 --- a/net/netfilter/nft_bitwise.c +++ b/net/netfilter/nft_bitwise.c @@ -52,11 +52,11 @@ static int nft_bitwise_init(const struct nft_ctx *ctx, u32 len; int err; - if (tb[NFTA_BITWISE_SREG] == NULL || - tb[NFTA_BITWISE_DREG] == NULL || - tb[NFTA_BITWISE_LEN] == NULL || - tb[NFTA_BITWISE_MASK] == NULL || - tb[NFTA_BITWISE_XOR] == NULL) + if (!tb[NFTA_BITWISE_SREG] || + !tb[NFTA_BITWISE_DREG] || + !tb[NFTA_BITWISE_LEN] || + !tb[NFTA_BITWISE_MASK] || + !tb[NFTA_BITWISE_XOR]) return -EINVAL; err = nft_parse_u32_check(tb[NFTA_BITWISE_LEN], U8_MAX, &len); |