mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-12-27 12:21:22 -05:00
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>
This commit is contained in:
committed by
Pablo Neira Ayuso
parent
20eb5e7cb7
commit
09c0d0aef5
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user