Skip to contentSkip to conversation

netfilter: nf_tables: remove assignment with no effect in chain blob builder

PATCH New Pablo Neira Ayuso 1 participant 1 message Jan 27, 2022

Subsystems (2)
lore
Share & tools
lore

Pablo Neira Ayuso

author maintainer
#0 lore raw

PATCH 1/1 netfilter: nf_tables: remove assignment with no effect in chain blob builder

cppcheck possible warnings:

Quoted 1 line
Quoted 1 line

net/netfilter/nf_tables_api.c:2014:2: warning: Assignment of function parameter has no effect outside the function. Did you forget dereferencing it? [uselessAssignmentPtrArg]

    ptr += offsetof(struct nft_rule_dp, data);
    ^
---
 net/netfilter/nf_tables_api.c | 1 -
 1 file changed, 1 deletion(-)
net/netfilter/nf_tables_api.c +0 -1
index cf454f8ca2b0..5fa16990da95 100644
@@ -2011,7 +2011,6 @@ static void nft_last_rule(struct nft_rule_blob *blob, const void *ptr)
 
 	prule = (struct nft_rule_dp *)ptr;
 	prule->is_last = 1;
-	ptr += offsetof(struct nft_rule_dp, data);
 	/* blob size does not include the trailer rule */
 }
 
Signature · 1 line
2.30.2