Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp8286185ybl; Tue, 24 Dec 2019 19:12:49 -0800 (PST) X-Google-Smtp-Source: APXvYqzrAkVeK5jyJ23wv98r/dOVsX6PHreLtu66FP1/k/wAckSG2iogu8cb1AqUewQCxKiaGMgM X-Received: by 2002:a9d:7552:: with SMTP id b18mr8793147otl.20.1577243568975; Tue, 24 Dec 2019 19:12:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577243568; cv=none; d=google.com; s=arc-20160816; b=Qk7S4ZxvyRUeAhafsWaD/RoOyaym860st/Fdkz7GKvZ9UZy2eNNXsAlHSEuHbgesJY BuAtawiW9IdRoqDQlZ++iBlXt/ZR5PurjyDRBRvhWQIC/Sf1GWPKKVglufOs7//4BPli XdG19mNubyhk6Y8X2BaIjc8W74ZCdgy6KkIwru4udG3TUM29I/gukD5PvwNm43eamTot 4do/YjQdJdCbtmfcQhwbQzNLtPW9d5GoGEuR09c9Tgqz9gFIC+Zpp2RPWwUwcaRXMy1n jen9Ely9c97ePJnv7Ur3Q22eDNTM9iW77RmnnD0XeT6TbSudwHIc5OXLxUhPbtbz5Rqm jiMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=k1m2TpUORIJJpl6WlVyhcLTayrCV6aQRvYYZ9hfToAA=; b=xuPcq+qz7V7NSc8To/qFFjxpDD62yKiiEU1in0ssAfs1/CuUszNX1dfj6OHnrNZJzv pToof2MYlng9V6pNLBw7Xs0ny7M5WP38THG9VlextE0j8T5j3PIrYFxJeqHMKWaNuU2j LNlhbVmwsKh8CPxSsmLAZoNHD8cnl/Ogv0XlDQMw+9TRli4BGKPdK3ZLlrxS20Evqb4g ftoA7u/wQ3nwDkVvOhvOs/wX3Qgrdcfbzr7zUJVPa9wxQT6n1WhPImq5XEw3yCvLnQEO DeIh3TwiR42a4Zr4iPAqbp0RuwHPrYvb1Djm/iQQLI6KIVkF36vwo7/uS1fnJB0Vmqxd jSLA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-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 r6si12857947otn.216.2019.12.24.19.12.26; Tue, 24 Dec 2019 19:12:48 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-nfs-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-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726328AbfLYDMZ (ORCPT + 99 others); Tue, 24 Dec 2019 22:12:25 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:48652 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726325AbfLYDMZ (ORCPT ); Tue, 24 Dec 2019 22:12:25 -0500 Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 3D8926CD8E7B592D1A2F; Wed, 25 Dec 2019 11:12:23 +0800 (CST) Received: from huawei.com (10.90.53.225) by DGGEMS405-HUB.china.huawei.com (10.3.19.205) with Microsoft SMTP Server id 14.3.439.0; Wed, 25 Dec 2019 11:12:16 +0800 From: zhengbin To: , , CC: Subject: [PATCH 2/3] nfsd: use true,false for bool variable in nfs4proc.c Date: Wed, 25 Dec 2019 11:19:35 +0800 Message-ID: <1577243976-46389-3-git-send-email-zhengbin13@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1577243976-46389-1-git-send-email-zhengbin13@huawei.com> References: <1577243976-46389-1-git-send-email-zhengbin13@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.90.53.225] X-CFilter-Loop: Reflected Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org Fixes coccicheck warning: fs/nfsd/nfs4proc.c:235:1-18: WARNING: Assignment of 0/1 to bool variable fs/nfsd/nfs4proc.c:368:1-17: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot Signed-off-by: zhengbin --- fs/nfsd/nfs4proc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c index 4798667..d7d910e 100644 --- a/fs/nfsd/nfs4proc.c +++ b/fs/nfsd/nfs4proc.c @@ -232,7 +232,7 @@ do_open_lookup(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, stru if (!*resfh) return nfserr_jukebox; fh_init(*resfh, NFS4_FHSIZE); - open->op_truncate = 0; + open->op_truncate = false; if (open->op_create) { /* FIXME: check session persistence and pnfs flags. @@ -365,7 +365,7 @@ nfsd4_open(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, if (open->op_create && open->op_claim_type != NFS4_OPEN_CLAIM_NULL) return nfserr_inval; - open->op_created = 0; + open->op_created = false; /* * RFC5661 18.51.3 * Before RECLAIM_COMPLETE done, server should deny new lock -- 2.7.4