projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e010904
)
scripts/kallsyms: remove unneeded length check for prefix matching
author
Masahiro Yamada
<yamada.masahiro@socionext.com>
Sat, 23 Nov 2019 16:04:34 +0000
(
01:04
+0900)
committer
Masahiro Yamada
<yamada.masahiro@socionext.com>
Mon, 25 Nov 2019 12:03:18 +0000
(21:03 +0900)
l <= strlen(sym_name) is unnecessary for prefix matching.
strncmp() will do.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
scripts/kallsyms.c
patch
|
blob
|
history
diff --git
a/scripts/kallsyms.c
b/scripts/kallsyms.c
index 14a50c8d3f3400ea1b40b0eaeb7f045b57d2d4da..a57636c6f84fdbd2ebb1b2275e3fe9832c3eb764 100644
(file)
--- 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;
}