[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1507383097082-123648613-2-diffsplit-thomas@m3y3r.de>
Date: Sat, 07 Oct 2017 16:02:21 +0200
From: Thomas Meyer <thomas@...3r.de>
To: dhowells@...hat.com, linux-afs@...ts.infradead.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] afs: Fix bool initialization/comparison
Bool initializations should use true and false. Bool tests don't need
comparisons.
Signed-off-by: Thomas Meyer <thomas@...3r.de>
---
diff -u -p a/fs/afs/cache.c b/fs/afs/cache.c
--- a/fs/afs/cache.c
+++ b/fs/afs/cache.c
@@ -195,7 +195,7 @@ enum fscache_checkaux afs_vlocation_cach
* VL record from the cache */
if (!vlocation->valid || vlocation->vldb.rtime == cvldb->rtime) {
memcpy((uint8_t *)&vlocation->vldb.nservers, buffer, dlen);
- vlocation->valid = 1;
+ vlocation->valid = true;
_leave(" = SUCCESS [c->m]");
return FSCACHE_CHECKAUX_OKAY;
}
diff -u -p a/fs/afs/super.c b/fs/afs/super.c
--- a/fs/afs/super.c
+++ b/fs/afs/super.c
@@ -211,7 +211,7 @@ static int afs_parse_options(struct afs_
break;
case afs_opt_rwpath:
- params->rwpath = 1;
+ params->rwpath = true;
break;
case afs_opt_vol:
@@ -219,7 +219,7 @@ static int afs_parse_options(struct afs_
break;
case afs_opt_autocell:
- params->autocell = 1;
+ params->autocell = true;
break;
default:
diff -u -p a/fs/afs/vlocation.c b/fs/afs/vlocation.c
--- a/fs/afs/vlocation.c
+++ b/fs/afs/vlocation.c
@@ -154,7 +154,7 @@ out:
printk(KERN_NOTICE "kAFS:"
" Active volume no longer valid '%s'\n",
vl->vldb.name);
- vl->valid = 0;
+ vl->valid = false;
ret = -ENOMEDIUM;
}
Powered by blists - more mailing lists