From 46ec8897a8b3d86900912e0ca58677c1d9ba2cb2 Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Sat, 7 Mar 2009 16:35:17 -0300 Subject: [PATCH] reorganize: Fix bug in cu__find_base_type_of_size alternate type names c'n'paste error for the two bytes case, the alternate name was also being set to the type_name variable, duh. Signed-off-by: Arnaldo Carvalho de Melo --- dwarves_reorganize.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dwarves_reorganize.c b/dwarves_reorganize.c index 1b2475f..0604be1 100644 --- a/dwarves_reorganize.c +++ b/dwarves_reorganize.c @@ -477,7 +477,7 @@ static struct tag *cu__find_base_type_of_size(const struct cu *cu, type_name = "unsigned char"; break; case sizeof(unsigned short int): type_name = "short unsigned int"; - type_name = "unsigned short"; break; + type_name_alt = "unsigned short"; break; case sizeof(unsigned int): type_name = "unsigned int"; type_name_alt = "unsigned"; break; @@ -746,9 +746,9 @@ static void class__fixup_member_types(struct class *self, const struct cu *cu, real_size, &new_type_id); if (new_type_tag == NULL) { - fprintf(stderr, "pahole: couldn't find" + fprintf(stderr, "%s: couldn't find" " a base_type of %d bytes!\n", - real_size); + __func__, real_size); continue; } class__fixup_bitfield_types(self,