Commit eaa2b34d authored by Xuanqiang Luo's avatar Xuanqiang Luo Committed by Pablo Neira Ayuso
Browse files

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: default avatarXuanqiang Luo <luoxuanqiang@kylinos.cn>
Acked-by: default avatarFlorian Westphal <fw@strlen.de>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent 08764531
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -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)