scripts/kallsyms: remove unneeded length check for prefix matching

l <= strlen(sym_name) is unnecessary for prefix matching.
strncmp() will do.
Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
上级 e0109042
无相关合并请求
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
反馈
建议
客服 返回
顶部