1
0
Fork 0

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>
alistair/sensors
Masahiro Yamada 2020-02-18 19:00:31 +09:00
parent 87d660f085
commit 3f9070a67a
1 changed files with 1 additions and 1 deletions

View File

@ -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;