projects
/
platform
/
kernel
/
linux-rpi3.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b9d80f8
)
netfilter: nft_lookup: remove superfluous element found check
author
Pablo Neira Ayuso
<pablo@netfilter.org>
Tue, 20 Sep 2016 16:22:46 +0000
(18:22 +0200)
committer
Pablo Neira Ayuso
<pablo@netfilter.org>
Fri, 23 Sep 2016 07:30:48 +0000
(09:30 +0200)
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>
net/netfilter/nft_lookup.c
patch
|
blob
|
history
diff --git
a/net/netfilter/nft_lookup.c
b/net/netfilter/nft_lookup.c
index
e164325
..
8166b69
100644
(file)
--- a/
net/netfilter/nft_lookup.c
+++ b/
net/netfilter/nft_lookup.c
@@
-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(®s->data[priv->dreg],
nft_set_ext_data(ext), set->dlen);