[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:
Arnaldo Carvalho de Melo 2006-11-05 18:30:10 -02:00
parent 51c81fb099
commit d2c9a9d726
1 changed files with 1 additions and 1 deletions

View File

@ -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);