Thread (3 messages) flat view 3 messages, 3 authors, 2021-10-28
STALE1785d LANDED

Landed in mainline as d4ffeeb7315d on 2021-11-04.

[PATCH linux-next] ext4:namei: fix boolreturn.cocci warnings

From: CGEL <hidden>
Date: 2021-08-24 05:55:54
Also in: lkml
Subsystem: ext4 file system, filesystems (vfs and infrastructure), the rest · Maintainers: "Theodore Ts'o", Alexander Viro, Christian Brauner, Linus Torvalds

From: Jing Yangyang <redacted>

Return statements in functions returning bool should use true/false
instead of 1/0.

./fs/ext4/namei.c:1441:12-13:WARNING:return of 0/1 in function
'ext4_match' with return type bool

Reported-by: Zeal Robot <redacted>
Signed-off-by: Jing Yangyang <redacted>
---
 fs/ext4/namei.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
index f3bbcd4..b5cb32d 100644
--- a/fs/ext4/namei.c
+++ b/fs/ext4/namei.c
@@ -1438,7 +1438,7 @@ static bool ext4_match(struct inode *parent,
 					fname->hinfo.minor_hash !=
 						EXT4_DIRENT_MINOR_HASH(de)) {
 
-					return 0;
+					return false;
 				}
 			}
 			return !ext4_ci_compare(parent, &cf, de->name,
-- 
1.8.3.1

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help