Commit 04311b9b authored by Tiezhu Yang's avatar Tiezhu Yang Committed by Luis Chamberlain

module: Make is_valid_name() return bool

The return value of is_valid_name() is true or false,
so change its type to reflect that.
Signed-off-by: default avatarTiezhu Yang <yangtiezhu@loongson.cn>
Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
parent 60da3640
...@@ -1059,12 +1059,12 @@ static int secref_whitelist(const char *fromsec, const char *fromsym, ...@@ -1059,12 +1059,12 @@ static int secref_whitelist(const char *fromsec, const char *fromsym,
* only by merging __exit and __init sections into __text, bloating * only by merging __exit and __init sections into __text, bloating
* the kernel (which is especially evil on embedded platforms). * the kernel (which is especially evil on embedded platforms).
*/ */
static inline int is_valid_name(struct elf_info *elf, Elf_Sym *sym) static inline bool is_valid_name(struct elf_info *elf, Elf_Sym *sym)
{ {
const char *name = elf->strtab + sym->st_name; const char *name = elf->strtab + sym->st_name;
if (!name || !strlen(name)) if (!name || !strlen(name))
return 0; return false;
return !is_mapping_symbol(name); return !is_mapping_symbol(name);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment