Commit 6c64825b authored by Patrick McHardy's avatar Patrick McHardy Committed by David S. Miller

netfilter: nf_conntrack_extend: avoid unnecessary "ct->ext" dereferences

As Linus points out, "ct->ext" and "new" are always equal, avoid unnecessary
dereferences and use "new" directly.
Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 93bc4e89
...@@ -115,10 +115,10 @@ void *__nf_ct_ext_add(struct nf_conn *ct, enum nf_ct_ext_id id, gfp_t gfp) ...@@ -115,10 +115,10 @@ void *__nf_ct_ext_add(struct nf_conn *ct, enum nf_ct_ext_id id, gfp_t gfp)
ct->ext = new; ct->ext = new;
} }
ct->ext->offset[id] = newoff; new->offset[id] = newoff;
ct->ext->len = newlen; new->len = newlen;
memset((void *)ct->ext + newoff, 0, newlen - newoff); memset((void *)new + newoff, 0, newlen - newoff);
return (void *)ct->ext + newoff; return (void *)new + newoff;
} }
EXPORT_SYMBOL(__nf_ct_ext_add); EXPORT_SYMBOL(__nf_ct_ext_add);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment