From 75c769a900185fafa39c79f122792b12514536d6 Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Fri, 25 Jun 2021 14:04:01 -0300 Subject: [PATCH] pahole: enumerations__lookup_entry_from_value() doesn't need to return a CU anymore As it will not be used in the caller. Signed-off-by: Arnaldo Carvalho de Melo --- pahole.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pahole.c b/pahole.c index f757a17..fe99057 100644 --- a/pahole.c +++ b/pahole.c @@ -1489,14 +1489,13 @@ static struct enumerator *enumeration__lookup_entry_from_value(struct type *enum return NULL; } -static struct enumerator *enumerations__lookup_entry_from_value(struct list_head *enumerations, struct cu **cup, uint64_t value) +static struct enumerator *enumerations__lookup_entry_from_value(struct list_head *enumerations, uint64_t value) { struct tag_cu_node *pos; list_for_each_entry(pos, enumerations, node) { struct enumerator *enumerator = enumeration__lookup_entry_from_value(tag__type(pos->tc.tag), value); if (enumerator) { - *cup = pos->tc.cu; return enumerator; } } @@ -1732,8 +1731,7 @@ static struct tag *tag__real_type(struct tag *tag, struct cu **cup, void *instan if (!list_empty(&type->type_enum) && type->type_member) { struct class_member *member = type->type_member; uint64_t value = base_type__value(instance + member->byte_offset, member->byte_size); - struct cu *cu_enumerator; - struct enumerator *enumerator = enumerations__lookup_entry_from_value(&type->type_enum, &cu_enumerator, value); + struct enumerator *enumerator = enumerations__lookup_entry_from_value(&type->type_enum, value); char name[1024]; if (!enumerator)