Skip to content

Commit

Permalink
netfilter: nft_lookup: remove superfluous element found check
Browse files Browse the repository at this point in the history
We already checked for !found just a bit before:

        if (!found) {
                regs->verdict.code = NFT_BREAK;
                return;
        }

        if (found && set->flags & NFT_SET_MAP)
            ^^^^^

So this redundant check can just go away.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
  • Loading branch information
Pablo Neira Ayuso committed Sep 23, 2016
1 parent b9d80f8 commit 4004d5c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/netfilter/nft_lookup.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ static void nft_lookup_eval(const struct nft_expr *expr,
return;
}

if (found && set->flags & NFT_SET_MAP)
if (set->flags & NFT_SET_MAP)
nft_data_copy(&regs->data[priv->dreg],
nft_set_ext_data(ext), set->dlen);

Expand Down

0 comments on commit 4004d5c

Please sign in to comment.