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: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
93bc4e89c2
commit
6c64825bf4
@ -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->offset[id] = newoff;
|
||||
ct->ext->len = newlen;
|
||||
memset((void *)ct->ext + newoff, 0, newlen - newoff);
|
||||
return (void *)ct->ext + newoff;
|
||||
new->offset[id] = newoff;
|
||||
new->len = newlen;
|
||||
memset((void *)new + newoff, 0, newlen - newoff);
|
||||
return (void *)new + newoff;
|
||||
}
|
||||
EXPORT_SYMBOL(__nf_ct_ext_add);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user