diff options
author | Patrick McHardy <kaber@trash.net> | 2008-07-26 20:50:05 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-26 20:50:05 -0400 |
commit | 6c64825bf40ecc1b01610762ca736b18c8a9db92 (patch) | |
tree | 2cfd89fde882986d9f46f496f246192583cc3119 /net | |
parent | 93bc4e89c260d91576840c4881d1066d84ccd422 (diff) |
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>
Diffstat (limited to 'net')
-rw-r--r-- | net/netfilter/nf_conntrack_extend.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/netfilter/nf_conntrack_extend.c b/net/netfilter/nf_conntrack_extend.c index c956ef7eeecb..4b2c769d555f 100644 --- a/net/netfilter/nf_conntrack_extend.c +++ b/net/netfilter/nf_conntrack_extend.c | |||
@@ -115,10 +115,10 @@ void *__nf_ct_ext_add(struct nf_conn *ct, enum nf_ct_ext_id id, gfp_t gfp) | |||
115 | ct->ext = new; | 115 | ct->ext = new; |
116 | } | 116 | } |
117 | 117 | ||
118 | ct->ext->offset[id] = newoff; | 118 | new->offset[id] = newoff; |
119 | ct->ext->len = newlen; | 119 | new->len = newlen; |
120 | memset((void *)ct->ext + newoff, 0, newlen - newoff); | 120 | memset((void *)new + newoff, 0, newlen - newoff); |
121 | return (void *)ct->ext + newoff; | 121 | return (void *)new + newoff; |
122 | } | 122 | } |
123 | EXPORT_SYMBOL(__nf_ct_ext_add); | 123 | EXPORT_SYMBOL(__nf_ct_ext_add); |
124 | 124 | ||