diff mbox series

fs/cifs: Assign boolean values to a bool variable

Message ID 1610615360-70523-1-git-send-email-abaci-bugfix@linux.alibaba.com (mailing list archive)
State New, archived
Headers show
Series fs/cifs: Assign boolean values to a bool variable | expand

Commit Message

Abaci Team Jan. 14, 2021, 9:09 a.m. UTC
Fix the following coccicheck warnings:

./fs/cifs/connect.c:3386:2-21: WARNING: Assignment of 0/1 to
bool variable.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Zhong <abaci-bugfix@linux.alibaba.com>
---
 fs/cifs/connect.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Steve French Jan. 17, 2021, 2:08 a.m. UTC | #1
merged into cifs-2.6.git for-next

On Thu, Jan 14, 2021 at 3:11 AM Jiapeng Zhong
<abaci-bugfix@linux.alibaba.com> wrote:
>
> Fix the following coccicheck warnings:
>
> ./fs/cifs/connect.c:3386:2-21: WARNING: Assignment of 0/1 to
> bool variable.
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Jiapeng Zhong <abaci-bugfix@linux.alibaba.com>
> ---
>  fs/cifs/connect.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
> index b9df855..8fbb5ea 100644
> --- a/fs/cifs/connect.c
> +++ b/fs/cifs/connect.c
> @@ -2195,7 +2195,7 @@ static int match_tcon(struct cifs_tcon *tcon, struct smb3_fs_context *ctx)
>         if (ses->server->capabilities & SMB2_GLOBAL_CAP_DIRECTORY_LEASING)
>                 tcon->nohandlecache = ctx->nohandlecache;
>         else
> -               tcon->nohandlecache = 1;
> +               tcon->nohandlecache = true;
>         tcon->nodelete = ctx->nodelete;
>         tcon->local_lease = ctx->local_lease;
>         INIT_LIST_HEAD(&tcon->pending_opens);
> --
> 1.8.3.1
>
diff mbox series

Patch

diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index b9df855..8fbb5ea 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -2195,7 +2195,7 @@  static int match_tcon(struct cifs_tcon *tcon, struct smb3_fs_context *ctx)
 	if (ses->server->capabilities & SMB2_GLOBAL_CAP_DIRECTORY_LEASING)
 		tcon->nohandlecache = ctx->nohandlecache;
 	else
-		tcon->nohandlecache = 1;
+		tcon->nohandlecache = true;
 	tcon->nodelete = ctx->nodelete;
 	tcon->local_lease = ctx->local_lease;
 	INIT_LIST_HEAD(&tcon->pending_opens);