[CLASSES]: Check if the last member had zero size before print cacheline boundary
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
This commit is contained in:
parent
51c81fb099
commit
d2c9a9d726
|
@ -604,7 +604,7 @@ static void class__print_struct(struct class *self, const struct cu *cu)
|
|||
|
||||
printf("%s {\n", class__name(self, cu, name, sizeof(name)));
|
||||
list_for_each_entry(pos, &self->members, node) {
|
||||
if (sum > 0 && sum % cacheline_size == 0)
|
||||
if (sum > 0 && last_size > 0 && sum % cacheline_size == 0)
|
||||
printf(" /* ---------- cacheline "
|
||||
"%u boundary ---------- */\n",
|
||||
sum / cacheline_size);
|
||||
|
|
Loading…
Reference in New Issue