Initialize nr_entries in class__new
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
This commit is contained in:
parent
17025a38f2
commit
e5e7c6fc8b
4
pahole.c
4
pahole.c
|
@ -255,6 +255,7 @@ struct class *class__new(const unsigned int tag,
|
|||
self->type.cu = 0;
|
||||
self->type.offset = 0;
|
||||
self->size = 0;
|
||||
self->nr_entries = 0;
|
||||
}
|
||||
|
||||
return self;
|
||||
|
@ -331,8 +332,7 @@ void class__print(struct class *self)
|
|||
sum_holes += hole;
|
||||
}
|
||||
|
||||
printf("}; /* sizeof struct: %d",
|
||||
self->size);
|
||||
printf("}; /* sizeof struct(%s): %d", self->name, self->size);
|
||||
if (sum_holes > 0)
|
||||
printf(", sum sizeof members: %lu, sum holes: %lu", sum, sum_holes);
|
||||
puts(" */");
|
||||
|
|
Loading…
Reference in New Issue