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:
parent
e0109042cc
commit
c5e5002f36
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue