Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp694692imm; Wed, 19 Sep 2018 05:34:12 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYj4gMo7KI8W9C2727sAFlS3rRwx85xjNCihVbyVkJQO2pyJgEw5p/IQTGxwwv9owkeecOY X-Received: by 2002:a17:902:a9ca:: with SMTP id b10-v6mr33824187plr.198.1537360452796; Wed, 19 Sep 2018 05:34:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537360452; cv=none; d=google.com; s=arc-20160816; b=wyKFlAZNUzogCrAjiHdGzPU+4x3NV6MrZ+wYgmJPls1GcoDxmcnCMUQwrOBlyQFKCk mIGg5w+i3IqeLtTGiW/FW27JTwwSElkAAc4sDMko3G2U1SX+1wOT7vOpxKs3ZLQRjR7t vMyfLdPkfdyx1iv4ZQH44LGrGDDn9UI3o+yF+Sdn2WWCZG2rsGgtjJ+/lMrTyni8x+lL zosOOcMhttjq9qsXfhW6Dh99DzTbYDovSE9Vetgf3yI2WJzAVhFvQpTbSCjIYgvgC8HL fP9vAB0QgbWg84FdWnZuOZmZcdQWWVmpKX+XSLSnYZZHbazu47Sf607eIoQxDIz7xOv4 aedg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=ZXpcL7P6/HMoDz+ksUKcfQ7wz9TG8qrV6UoXC9T6jBI=; b=leNnHzhEmGxT/yi5e/+s+mLpKD2uhYA4Jc2WichngaZrgTrMVCA0ggENVP2U5Umtyl tA6gWqI5ci+HYyUdmZ04IxUyxp3JGkZfKswQNeXWcGd1lEeoBa21JrDinaVVEKK2tL8u /S3Og08GIlNEIwAyV3c1iSaH29RasQyfb+aOZ609OeQqj7cZpWclAC7cYy2po9AHHlWQ /y7xFEzzVmN9hi5jcfdi+fYBuoXSEh+YKZZkRnrrB3HGKoOMj9xdhELtHbDGA3bStfSF b4xtVENCuUCqRuF78Aw+9KBWg12EgSXRKC5ZsHmrU7l3R291Z/nO+TR3D8A/9evrVwNB RqqA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 1-v6si21626125pln.415.2018.09.19.05.33.57; Wed, 19 Sep 2018 05:34:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731713AbeISSLV (ORCPT + 99 others); Wed, 19 Sep 2018 14:11:21 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:35933 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731447AbeISSLV (ORCPT ); Wed, 19 Sep 2018 14:11:21 -0400 Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 8E485814DB568; Wed, 19 Sep 2018 20:33:34 +0800 (CST) Received: from linux-ibm.site (10.175.102.37) by DGGEMS411-HUB.china.huawei.com (10.3.19.211) with Microsoft SMTP Server id 14.3.399.0; Wed, 19 Sep 2018 20:33:31 +0800 From: zhong jiang To: CC: , , , , , Subject: [PATCH] netfilter: conntrack: get rid of double sizeof Date: Wed, 19 Sep 2018 20:21:11 +0800 Message-ID: <1537359671-53720-1-git-send-email-zhongjiang@huawei.com> X-Mailer: git-send-email 1.7.12.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.102.37] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org sizeof(sizeof()) is quite strange and does not seem to be what is wanted here. The issue is detected with the help of Coccinelle. Signed-off-by: zhong jiang --- net/netfilter/nf_conntrack_proto_tcp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/netfilter/nf_conntrack_proto_tcp.c b/net/netfilter/nf_conntrack_proto_tcp.c index b4bdf9e..247b897 100644 --- a/net/netfilter/nf_conntrack_proto_tcp.c +++ b/net/netfilter/nf_conntrack_proto_tcp.c @@ -1213,8 +1213,8 @@ static int tcp_to_nlattr(struct sk_buff *skb, struct nlattr *nla, #define TCP_NLATTR_SIZE ( \ NLA_ALIGN(NLA_HDRLEN + 1) + \ NLA_ALIGN(NLA_HDRLEN + 1) + \ - NLA_ALIGN(NLA_HDRLEN + sizeof(sizeof(struct nf_ct_tcp_flags))) + \ - NLA_ALIGN(NLA_HDRLEN + sizeof(sizeof(struct nf_ct_tcp_flags)))) + NLA_ALIGN(NLA_HDRLEN + sizeof(struct nf_ct_tcp_flags)) + \ + NLA_ALIGN(NLA_HDRLEN + sizeof(struct nf_ct_tcp_flags))) static int nlattr_to_tcp(struct nlattr *cda[], struct nf_conn *ct) { -- 1.7.12.4