Skip to contentSkip to conversation

fs: buffer: use true and false for boolean values

PATCH New Gustavo A. R. Silva 1 participant 1 message Aug 2, 2018 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fs: buffer: use true and false for boolean values

Return statements in functions returning bool should use true or false instead of an integer value.

This issue was detected with the help of Coccinelle.

---
 fs/buffer.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
fs/buffer.c +2 -2
index ebf78ab..bef8ade 100644
@@ -1415,10 +1415,10 @@ static bool has_bh_in_lru(int cpu, void *dummy)
 	
 	for (i = 0; i < BH_LRU_SIZE; i++) {
 		if (b->bhs[i])
-			return 1;
+			return true;
 	}
 
-	return 0;
+	return false;
 }
 
 void invalidate_bh_lrus(void)
Signature · 1 line
2.7.4