diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2019-11-24 01:04:34 +0900 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2019-11-25 21:03:18 +0900 |
commit | c5e5002f3603e01f50d8d61878a4ca8ffca7bd15 (patch) | |
tree | 7b7095bb88643ebb3ad9a4357728f317ed3adb9b /scripts | |
parent | e0109042cc4ee12b3689e29c872c1436e0424c69 (diff) |
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>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/kallsyms.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c index 14a50c8d3f34..a57636c6f84f 100644 --- a/scripts/kallsyms.c +++ b/scripts/kallsyms.c @@ -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; } |