netfilter: Remove redundant NFCT_ALIGN call
Subsystems (2)
PATCH 1/1 netfilter: Remove redundant NFCT_ALIGN call
From: Xuanqiang Luo <[email protected]>
The "nf_ct_tmpl_alloc" function had a redundant call to "NFCT_ALIGN" when aligning the pointer "p". Since "NFCT_ALIGN" always gives the same result for the same input.
Signed-off-by Xuanqiang Luo <[email protected]>
--- net/netfilter/nf_conntrack_core.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
net/netfilter/nf_conntrack_core.c +1 -3
@@ -531,10 +531,8 @@ struct nf_conn *nf_ct_tmpl_alloc(struct net *net, p = tmpl; tmpl = (struct nf_conn *)NFCT_ALIGN ((unsigned long )p); -if (tmpl != p) { - tmpl = (struct nf_conn *)NFCT_ALIGN ((unsigned long )p); +if (tmpl != p) tmpl->proto.tmpl_padto = (char *)tmpl - (char *)p; - } }else { tmpl =kzalloc (sizeof (*tmpl), flags);if (!tmpl)
Signature · 1 line
2.27.0
Quoted 5 lines · Xuanqiang Luo
From: Xuanqiang Luo <[email protected]>
The "
nf_ct_tmpl_alloc" function had a redundant call to "NFCT_ALIGN" when aligning the pointer "p". Since "NFCT_ALIGN" always gives the same result for the same input.
Acked-by Florian Westphal <[email protected]>
Quoted 5 lines · Xuanqiang Luo
From: Xuanqiang Luo <[email protected]>
The "
nf_ct_tmpl_alloc" function had a redundant call to "NFCT_ALIGN" when aligning the pointer "p". Since "NFCT_ALIGN" always gives the same result for the same input.
Applied to nf-next, thanks