Commit c5e5002f authored by Masahiro Yamada's avatar Masahiro Yamada

scripts/kallsyms: remove unneeded length check for prefix matching

l <= strlen(sym_name) is unnecessary for prefix matching.
strncmp() will do.
Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
parent e0109042
...@@ -246,8 +246,7 @@ static int symbol_valid(struct sym_entry *s) ...@@ -246,8 +246,7 @@ static int symbol_valid(struct sym_entry *s)
for (i = 0; special_prefixes[i]; i++) { for (i = 0; special_prefixes[i]; i++) {
int l = strlen(special_prefixes[i]); int l = strlen(special_prefixes[i]);
if (l <= strlen(sym_name) && if (strncmp(sym_name, special_prefixes[i], l) == 0)
strncmp(sym_name, special_prefixes[i], l) == 0)
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment