summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2019-11-23 17:04:34 +0100
committerMasahiro Yamada <yamada.masahiro@socionext.com>2019-11-25 13:03:18 +0100
commitc5e5002f3603e01f50d8d61878a4ca8ffca7bd15 (patch)
tree7b7095bb88643ebb3ad9a4357728f317ed3adb9b /scripts
parentscripts/kallsyms: remove redundant is_arm_mapping_symbol() (diff)
downloadlinux-c5e5002f3603e01f50d8d61878a4ca8ffca7bd15.tar.xz
linux-c5e5002f3603e01f50d8d61878a4ca8ffca7bd15.zip
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.c3
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;
}