kconfig: use true and false for bool variable
authorYang Li <yang.lee@linux.alibaba.com>
Mon, 15 Mar 2021 06:55:44 +0000 (14:55 +0800)
committerMasahiro Yamada <masahiroy@kernel.org>
Wed, 14 Apr 2021 06:22:49 +0000 (15:22 +0900)
fixed the following coccicheck:
./scripts/kconfig/confdata.c:36:9-10: WARNING: return of 0/1 in function
'is_dir' with return type bool

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
scripts/kconfig/confdata.c

index f3998d5ddd02903041f9040b8ac4aa72b1ad91bd..c796d402665e4d71c4a65d7f26c83a02eb15d881 100644 (file)
@@ -33,7 +33,7 @@ static bool is_dir(const char *path)
        struct stat st;
 
        if (stat(path, &st))
-               return 0;
+               return false;
 
        return S_ISDIR(st.st_mode);
 }