scripts/kallsyms: remove unneeded length check for prefix matching

l <= strlen(sym_name) is unnecessary for prefix matching.
strncmp() will do.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
This commit is contained in:
Masahiro Yamada 2019-11-24 01:04:34 +09:00
parent e0109042cc
commit c5e5002f36
1 changed files with 1 additions and 2 deletions

View File

@ -246,8 +246,7 @@ static int symbol_valid(struct sym_entry *s)
for (i = 0; special_prefixes[i]; i++) {
int l = strlen(special_prefixes[i]);
if (l <= strlen(sym_name) &&
strncmp(sym_name, special_prefixes[i], l) == 0)
if (strncmp(sym_name, special_prefixes[i], l) == 0)
return 0;
}