mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-12-27 13:30:45 -05:00
netfilter: conntrack: Remove redundant NFCT_ALIGN call
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 <luoxuanqiang@kylinos.cn> Acked-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:
committed by
Pablo Neira Ayuso
parent
0876453147
commit
eaa2b34db0
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user