Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp8286184ybl; Tue, 24 Dec 2019 19:12:49 -0800 (PST) X-Google-Smtp-Source: APXvYqx+2TrOTbX+Baw2+wGj0qgm8rpxZ2FduloWLOzkUCKYRIv4OSSti8muhmFbYyj6BrYK0pCi X-Received: by 2002:a05:6830:128e:: with SMTP id z14mr40760745otp.184.1577243568982; 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=VRIFlIP/MjJnEKKrZtorwCsG7bskDvvHpqUxuc3y4KzhS9nl99qAeeKPVPGEiWxjzd zdTMyl2236ebBYb1egpFdcU7cFpbSYlBWKUt2I7Zvi1RENtzLKMzQCswVlwG9fRviBuC AaAx1RXQvXTFLN2xfGTcHlQsdTw1MTVYfSNRbyXHryqF5cobpMb1gqxv/WGpQlUoNpjM et+0zuAivOcLLCzSfgebTKuKy5bhp7ytLzLSqWtqtlAkv1bnTHdCLe+3QQgERSLqNQ6k es0DixrTx688/VA6mhr7xGHsF6ebUe3Qf3YrgP73SNshvnzuQetbGcq9cs7Rm4Y4CSsk tegw== 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=PV0lYAZZoP34TpQVsGmvJu+KSSH3YTBva7JANVNsDoY=; b=bLYMU2LaLwenvxn5UjCpBKwnfhtnxL5tTorKnM0wmJY3S0J8xURvNmf4Nms7Wi/ms+ 2okEu624FBQysM5SJE4t1rqBQH+l62M2l5IPr8p7LZnAHoWm5/pEstpFH5Fa/EXxh/Gz MMivJq6XatFG5dnEWMjuqxd4yLl5QiajXpItlDqrfxqURyXoQ1ZsFiMhkA4x15bykGms 9SIrk9ZrWqxAH+ufqAxJFS5xTa2SEKiVq6kzI9gHGGf6Iw7GrzGLjFH+lG80CaFQXB2z TZb/4C9ORStgmVYn0DkFSjLC/EEpXKjoD19Le8GRiaUzL0IKhuhKk1mXufJCc3CTHbry Jv0A== 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 o128si12020460oih.66.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 S1726325AbfLYDMZ (ORCPT + 99 others); Tue, 24 Dec 2019 22:12:25 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:48650 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726330AbfLYDMZ (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 39A73636251883F0981A; 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:15 +0800 From: zhengbin To: , , CC: Subject: [PATCH 1/3] nfsd: use true,false for bool variable in vfs.c Date: Wed, 25 Dec 2019 11:19:34 +0800 Message-ID: <1577243976-46389-2-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/vfs.c:1389:5-13: WARNING: Assignment of 0/1 to bool variable fs/nfsd/vfs.c:1398:5-13: WARNING: Assignment of 0/1 to bool variable fs/nfsd/vfs.c:1415:2-10: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot Signed-off-by: zhengbin --- fs/nfsd/vfs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c index c0dc491..891e09f 100644 --- a/fs/nfsd/vfs.c +++ b/fs/nfsd/vfs.c @@ -1386,7 +1386,7 @@ do_nfsd_create(struct svc_rqst *rqstp, struct svc_fh *fhp, && d_inode(dchild)->i_atime.tv_sec == v_atime && d_inode(dchild)->i_size == 0 ) { if (created) - *created = 1; + *created = true; break; } /* fall through */ @@ -1395,7 +1395,7 @@ do_nfsd_create(struct svc_rqst *rqstp, struct svc_fh *fhp, && d_inode(dchild)->i_atime.tv_sec == v_atime && d_inode(dchild)->i_size == 0 ) { if (created) - *created = 1; + *created = true; goto set_attr; } /* fall through */ @@ -1412,7 +1412,7 @@ do_nfsd_create(struct svc_rqst *rqstp, struct svc_fh *fhp, goto out_nfserr; } if (created) - *created = 1; + *created = true; nfsd_check_ignore_resizing(iap); -- 2.7.4