* [PATCH] fs/cifs: Simplify bool comparisoni.
@ 2021-01-14 9:11 Jiapeng Zhong
0 siblings, 0 replies; only message in thread
From: Jiapeng Zhong @ 2021-01-14 9:11 UTC (permalink / raw)
To: sfrench; +Cc: linux-cifs, samba-technical, linux-kernel, Jiapeng Zhong
Fix the follow coccicheck warnings:
./fs/cifs/connect.c: WARNING: Comparison 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 | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index b9df855..b7869a2 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -2628,7 +2628,7 @@ void reset_cifs_unix_caps(unsigned int xid, struct cifs_tcon *tcon,
} else if (ctx)
tcon->unix_ext = 1; /* Unix Extensions supported */
- if (tcon->unix_ext == 0) {
+ if (!tcon->unix_ext) {
cifs_dbg(FYI, "Unix extensions disabled so not set on reconnect\n");
return;
}
@@ -3740,7 +3740,7 @@ static void delayed_free(struct rcu_head *p)
if (!ses->binding) {
ses->capabilities = server->capabilities;
- if (linuxExtEnabled == 0)
+ if (!linuxExtEnabled)
ses->capabilities &= (~server->vals->cap_unix);
if (ses->auth_key.response) {
--
1.8.3.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-01-14 9:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-14 9:11 [PATCH] fs/cifs: Simplify bool comparisoni Jiapeng Zhong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox