diff --git a/pahole.c b/pahole.c index 0bb2ffb..6da85b8 100644 --- a/pahole.c +++ b/pahole.c @@ -1440,14 +1440,16 @@ static enum load_steal_kind pahole_stealer(struct cu *cu, pos = rb_entry(next, struct str_node, rb_node); next = rb_next(&pos->rb_node); + const char *name = pos->s; + static type_id_t class_id; bool include_decls = find_pointers_in_structs != 0 || stats_formatter == nr_methods_formatter; - struct tag *class = cu__find_type_by_name(cu, pos->s, include_decls, &class_id); + struct tag *class = cu__find_type_by_name(cu, name, include_decls, &class_id); if (class == NULL) { - class = cu__find_base_type_by_name(cu, pos->s, &class_id); + class = cu__find_base_type_by_name(cu, name, &class_id); if (class == NULL) { - if (strcmp(pos->s, "void")) + if (strcmp(name, "void")) continue; class_id = 0; }