linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH linux-next] ext4:namei: fix boolreturn.cocci warnings
@ 2021-08-24  5:55 CGEL
  2021-10-14  9:26 ` Jan Kara
  2021-10-28 14:52 ` Theodore Ts'o
  0 siblings, 2 replies; 3+ messages in thread
From: CGEL @ 2021-08-24  5:55 UTC (permalink / raw)
  To: tytso; +Cc: Andreas Dilger, linux-ext4, linux-kernel, Jing Yangyang,
	Zeal Robot

From: Jing Yangyang <jing.yangyang@zte.com.cn>

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 <zealci@zte.com.cn>
Signed-off-by: Jing Yangyang <jing.yangyang@zte.com.cn>
---
 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



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-10-28 14:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-24  5:55 [PATCH linux-next] ext4:namei: fix boolreturn.cocci warnings CGEL
2021-10-14  9:26 ` Jan Kara
2021-10-28 14:52 ` Theodore Ts'o

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).