fixdep: remove redundant null character check
PATCH 1/1 fixdep: remove redundant null character check
If *q is '\0', the condition (isalnum(*q) || *q == '_') is false anyway.
Ensuring non-zero *q is redundant.
Signed-off-by Masahiro Yamada <[email protected]>
---
scripts/basic/fixdep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/basic/fixdep.c +1 -1
@@ -246,7 +246,7 @@ static void parse_config_file(const char *p) } p +=7 ; q = p; -while (*q && (isalnum (*q) || *q =='_' )) +while (isalnum (*q) || *q =='_' ) q++;if (str_ends_with (p, q - p,"_MODULE" )) r = q -7 ;
Signature · 1 line
2.17.1
Quoted 7 lines · Masahiro Yamada
If *q is '\0', the condition (
isalnum(*q)|| *q == '_') is false anyway.Ensuring non-zero *q is redundant.
Signed-off-by Masahiro Yamada <[email protected]>---
Applied to linux-kbuild.
Quoted 19 lines
scripts/basic/fixdep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)scripts/basic/fixdep.c +1
-2@@ -246,7 +246,7 @@ static void parse_config_file(const char *p) } p +=7 ; q = p; -while (*q && (isalnum (*q) || *q =='_' )) +while (isalnum (*q) || *q =='_' ) q++;if (str_ends_with (p, q - p,"_MODULE" )) r = q -7 ; --2.17.1
Signature · 2 lines
Best Regards Masahiro Yamada