From 58e01fcae18c9d01be701bec9e9a8ee58269c7c1 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Sun, 1 May 2022 17:40:07 +0900 Subject: modpost: use bool type where appropriate Use 'bool' to clarify that the valid value is true or false. Signed-off-by: Masahiro Yamada Reviewed-by: Nick Desaulniers --- scripts/mod/sumversion.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'scripts/mod/sumversion.c') diff --git a/scripts/mod/sumversion.c b/scripts/mod/sumversion.c index 79bb9eaa65ac..6bf9caca0968 100644 --- a/scripts/mod/sumversion.c +++ b/scripts/mod/sumversion.c @@ -290,13 +290,11 @@ static int parse_file(const char *fname, struct md4_ctx *md) return 1; } /* Check whether the file is a static library or not */ -static int is_static_library(const char *objfile) +static bool is_static_library(const char *objfile) { int len = strlen(objfile); - if (objfile[len - 2] == '.' && objfile[len - 1] == 'a') - return 1; - else - return 0; + + return objfile[len - 2] == '.' && objfile[len - 1] == 'a'; } /* We have dir/file.o. Open dir/.file.o.cmd, look for source_ and deps_ line -- cgit v1.2.3