All of lore.kernel.org
 help / color / mirror / Atom feed
From: zhengbin <zhengbin13@huawei.com>
To: <bfields@fieldses.org>, <chuck.lever@oracle.com>,
	<linux-nfs@vger.kernel.org>
Cc: <zhengbin13@huawei.com>
Subject: [PATCH 2/3] nfsd: use true,false for bool variable in nfs4proc.c
Date: Wed, 25 Dec 2019 11:19:35 +0800	[thread overview]
Message-ID: <1577243976-46389-3-git-send-email-zhengbin13@huawei.com> (raw)
In-Reply-To: <1577243976-46389-1-git-send-email-zhengbin13@huawei.com>

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 <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
---
 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


  parent reply	other threads:[~2019-12-25  3:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-25  3:19 [PATCH 0/3] nfsd: use true,false for bool variable zhengbin
2019-12-25  3:19 ` [PATCH 1/3] nfsd: use true,false for bool variable in vfs.c zhengbin
2019-12-25  3:19 ` zhengbin [this message]
2019-12-25  3:19 ` [PATCH 3/3] nfsd: use true,false for bool variable in nfssvc.c zhengbin
2020-01-03 16:23 ` [PATCH 0/3] nfsd: use true,false for bool variable J. Bruce Fields

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1577243976-46389-3-git-send-email-zhengbin13@huawei.com \
    --to=zhengbin13@huawei.com \
    --cc=bfields@fieldses.org \
    --cc=chuck.lever@oracle.com \
    --cc=linux-nfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.