diff options
| author | Xuanqiang Luo <luoxuanqiang@kylinos.cn> | 2025-04-04 17:47:51 +0800 |
|---|---|---|
| committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2025-04-29 00:00:26 +0200 |
| commit | eaa2b34db021c304697b964505cd2477c7c77eb6 (patch) | |
| tree | 7590c134349f0ea05150568a1435a2b62df88a4c /net/netfilter | |
| parent | net: cgroup: Guard users of sock_cgroup_classid() (diff) | |
| download | linux-eaa2b34db021c304697b964505cd2477c7c77eb6.tar.gz linux-eaa2b34db021c304697b964505cd2477c7c77eb6.zip | |
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>
Diffstat (limited to 'net/netfilter')
| -rw-r--r-- | net/netfilter/nf_conntrack_core.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c index 7f8b245e287a..de8d50af9b5b 100644 --- a/net/netfilter/nf_conntrack_core.c +++ b/net/netfilter/nf_conntrack_core.c @@ -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) |
