summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorShen Lichuan <shenlichuan@vivo.com>2024-08-28 19:06:51 +0800
committerPablo Neira Ayuso <pablo@netfilter.org>2024-09-03 10:47:16 +0200
commit09c0d0aef56b3b026b55be092fd9e81f3ae0c8a9 (patch)
tree88559c262b71c2f6dcc56b936840042b0b6f824a /net
parent20eb5e7cb78c331107fbdf2f77a30fbea9338638 (diff)
netfilter: conntrack: Convert to use ERR_CAST()
Use the ERR_CAST macro to clearly indicate that this is a pointer to an error value and that a type conversion was performed. Signed-off-by: Shen Lichuan <shenlichuan@vivo.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net')
-rw-r--r--net/netfilter/nf_conntrack_core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c
index 9384426ddc06..d3cb53b008f5 100644
--- a/net/netfilter/nf_conntrack_core.c
+++ b/net/netfilter/nf_conntrack_core.c
@@ -1722,7 +1722,7 @@ init_conntrack(struct net *net, struct nf_conn *tmpl,
ct = __nf_conntrack_alloc(net, zone, tuple, &repl_tuple, GFP_ATOMIC,
hash);
if (IS_ERR(ct))
- return (struct nf_conntrack_tuple_hash *)ct;
+ return ERR_CAST(ct);
if (!nf_ct_add_synproxy(ct, tmpl)) {
nf_conntrack_free(ct);