fs/cifs: Assign boolean values to a bool variable
authorJiapeng Zhong <abaci-bugfix@linux.alibaba.com>
Thu, 14 Jan 2021 09:09:20 +0000 (17:09 +0800)
committerSteve French <stfrench@microsoft.com>
Mon, 18 Jan 2021 01:22:18 +0000 (19:22 -0600)
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>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/connect.c

index 5d39129..7c3325c 100644 (file)
@@ -2195,7 +2195,7 @@ cifs_get_tcon(struct cifs_ses *ses, 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);