From: Masahiro Yamada <masahiroy@kernel.org>
Date: Tue, 18 Feb 2020 10:00:31 +0000 (+0900)
Subject: fixdep: remove redundant null character check
X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=3f9070a67a94a2765e99adf0913c30b683a1b840;p=linux.git

fixdep: remove redundant null character check

If *q is '\0', the condition (isalnum(*q) || *q == '_') is false anyway.

It is redundant to ensure non-zero *q.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c
index ad2041817985c..877ca2c882463 100644
--- a/scripts/basic/fixdep.c
+++ b/scripts/basic/fixdep.c
@@ -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;