mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-26 16:41:25 +00:00
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
1 changed files with 1 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue