Commit c5e5002f authored by Masahiro Yamada's avatar Masahiro Yamada
Browse files

scripts/kallsyms: remove unneeded length check for prefix matching



l <= strlen(sym_name) is unnecessary for prefix matching.
strncmp() will do.

Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
parent e0109042
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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;
	}