Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1579892pxk; Thu, 10 Sep 2020 21:00:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy2+TqSpfoueAS1Q1TMXXU8zDXE82XL6NqdPZoAn98egxkg2nndhGerf0iap08XVDTxWhBq X-Received: by 2002:a17:906:2f02:: with SMTP id v2mr144449eji.465.1599796810413; Thu, 10 Sep 2020 21:00:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599796810; cv=none; d=google.com; s=arc-20160816; b=QdHapP4Y4r1hTa1QrAjCl/QE2Dgf96NdjrVHNRa8A6jCzxUZs0p9NKtaKjs5mQJutq SiscsqmUIDJSRUQZ6Txf/tY14p6HPmiiKt101oJo9dFDRLbCAAWky9m6n3KzMW5sQYCW Hl0k7sZ/Ir7xhCD0tvnMwqfxyz/WgrNhWXH7tdIj/dsZGzg674mNveHZ23cupy75tAEf pDdC3qFsLhVyd3qcHkCnp0id2KRTK6RAdy+k8Au96zAcDGj7T6gjwfRSCVCWAmPWj+G1 CIv2eSbQOxl594DyzhN5FUEi17LjovKh5QZwnQswyQncriMm43gVmSRuU+6sG7OZpnhs 4VDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=zifgMT1KUA8Rz8wvmUNKEGBo18H6K3XQg1S0BwT6NiM=; b=k/M7oGu92Qhl9UyDm3LcdORshIvjSjE5zpTxrjH2NCn14/uvUkrwmfoTMgxv7wuZhV ZGLx5yIMnsUoKUN1mUsDltHHbOsvxI8BjOujRtGpx79nXbsbj477lkrdr4ivIVk63x3J VIOctlYh1IPjlB4ahtiWMr5Mwc8xrchlukNxWxcElILAEy4usgIEB1EzELFOEP/TKi/Q /7+g4MaEDji5zbdMxvJKNS9qWHfivTIGDZ6yyzhlC1oB+JNElbpX2p2DC9D1f9VySsY/ ODSR2MqAI4zaHFFv95FGO1WLsAa9o/R4OrawXBY8TKMsZkAYgTovk0L36DyiuahA8saO hTWg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n18si469506ejz.158.2020.09.10.20.59.47; Thu, 10 Sep 2020 21:00:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725821AbgIKD7G (ORCPT + 99 others); Thu, 10 Sep 2020 23:59:06 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:59396 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725777AbgIKD66 (ORCPT ); Thu, 10 Sep 2020 23:58:58 -0400 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 4F1089F4014E2AD9523B; Fri, 11 Sep 2020 11:58:54 +0800 (CST) Received: from huawei.com (10.90.53.225) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.487.0; Fri, 11 Sep 2020 11:58:45 +0800 From: Zheng Bin To: , , , CC: , Subject: [PATCH -next 3/5] cifs: fix comparison to bool warning in smb2misc.c Date: Fri, 11 Sep 2020 12:05:37 +0800 Message-ID: <20200911040539.113307-4-zhengbin13@huawei.com> X-Mailer: git-send-email 2.26.0.106.g9fadedd In-Reply-To: <20200911040539.113307-1-zhengbin13@huawei.com> References: <20200911040539.113307-1-zhengbin13@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.90.53.225] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fixes coccicheck warning: fs/cifs/smb2misc.c:416:5-51: WARNING: Comparison to bool Signed-off-by: Zheng Bin --- fs/cifs/smb2misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/cifs/smb2misc.c b/fs/cifs/smb2misc.c index d88e2683626e..0864cfa87834 100644 --- a/fs/cifs/smb2misc.c +++ b/fs/cifs/smb2misc.c @@ -413,7 +413,7 @@ smb2_calc_size(void *buf, struct TCP_Server_Info *srvr) */ len += le16_to_cpu(pdu->StructureSize2); - if (has_smb2_data_area[le16_to_cpu(shdr->Command)] == false) + if (!has_smb2_data_area[le16_to_cpu(shdr->Command)]) goto calc_size_exit; smb2_get_data_area_len(&offset, &data_length, shdr); -- 2.26.0.106.g9fadedd