Skip to content

Commit e2b50d7

Browse files
committed
create-diff-object: make locals_match() and maybe_discarded_sym() return bool
Change the return type of locals_match() and maybe_discarded_sym() to better reflect their usage. Signed-off-by: Artem Savkov <asavkov@redhat.com>
1 parent 7207687 commit e2b50d7

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

kpatch-build/lookup.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,10 @@ struct lookup_table {
6868
#define for_each_exp_symbol(ndx, iter, table) \
6969
for (ndx = 0, iter = table->exp_syms; ndx < table->exp_nr; ndx++, iter++)
7070

71-
static int maybe_discarded_sym(const char *name)
71+
static bool maybe_discarded_sym(const char *name)
7272
{
7373
if (!name)
74-
return 0;
74+
return false;
7575

7676
/*
7777
* Sometimes these symbols are discarded during linking, and sometimes
@@ -85,12 +85,12 @@ static int maybe_discarded_sym(const char *name)
8585
strstr(name, "__addressable_") ||
8686
strstr(name, "__UNIQUE_ID_") ||
8787
!strncmp(name, ".L.str", 6))
88-
return 1;
88+
return true;
8989

90-
return 0;
90+
return false;
9191
}
9292

93-
static int locals_match(struct lookup_table *table, int idx,
93+
static bool locals_match(struct lookup_table *table, int idx,
9494
struct symbol *file_sym, struct list_head *sym_list)
9595
{
9696
struct symbol *sym;
@@ -122,7 +122,7 @@ static int locals_match(struct lookup_table *table, int idx,
122122
}
123123

124124
if (!found)
125-
return 0;
125+
return false;
126126
}
127127

128128
sym = file_sym;
@@ -158,10 +158,10 @@ static int locals_match(struct lookup_table *table, int idx,
158158
}
159159

160160
if (!found)
161-
return 0;
161+
return false;
162162
}
163163

164-
return 1;
164+
return true;
165165
}
166166

167167
static void find_local_syms(struct lookup_table *table, struct symbol *file_sym,

0 commit comments

Comments
 (0)