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@xxxxxxxxx> --- commit d928bf64722c65a7723ebff4161c4ca1256db6cf tree 0f9bf278b49529096f187b48b286f4dbe3c289b5 parent dfecb922fa57237ef11bad7b95cbbceb5fdaccce author Patrick McHardy <kaber@xxxxxxxxx> Sun, 27 Jul 2008 00:40:14 +0200 committer Patrick McHardy <kaber@xxxxxxxxx> Sun, 27 Jul 2008 00:40:14 +0200 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 c956ef7..4b2c769 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) 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); -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html