mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 03:04:51 +01: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:
parent
0876453147
commit
eaa2b34db0
1 changed files with 1 additions and 3 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue