Print this page
cleanup
*** 526,536 ****
}
void
print_demangled_name(int n, nltype *selfp)
{
! char *c = demangled_name(selfp);
int i;
if (c == selfp->name)
return;
--- 526,536 ----
}
void
print_demangled_name(int n, nltype *selfp)
{
! char *c = (char *)demangled_name(selfp);
int i;
if (c == selfp->name)
return;
*** 537,547 ****
(void) printf("\n");
for (i = 1; i < n; i++)
(void) printf(" ");
(void) printf("[%s]", selfp->name);
! free((void *)c);
}
void
sortchildren(nltype *parentp)
{
--- 537,547 ----
(void) printf("\n");
for (i = 1; i < n; i++)
(void) printf(" ");
(void) printf("[%s]", selfp->name);
! free(c);
}
void
sortchildren(nltype *parentp)
{
*** 1038,1054 ****
const char *d = demangled_name(nlp);
if (does_clash(namesortnlp, i, nnames)) {
(void) printf("%6.6s %d:%s\n",
peterbuffer, nlp->module->id, d);
! } else
(void) printf("%6.6s %s\n", peterbuffer,
d);
! if (d != nlp->name)
(void) printf("%6.6s [%s]", "",
nlp->name);
} else {
(void) printf("%6.6s ", peterbuffer);
(void) sprintf(peterbuffer, "<cycle %d>",
nlp->cycleno);
(void) printf("%-33.33s", peterbuffer);
--- 1038,1057 ----
const char *d = demangled_name(nlp);
if (does_clash(namesortnlp, i, nnames)) {
(void) printf("%6.6s %d:%s\n",
peterbuffer, nlp->module->id, d);
! } else {
(void) printf("%6.6s %s\n", peterbuffer,
d);
+ }
! if (d != nlp->name) {
(void) printf("%6.6s [%s]", "",
nlp->name);
+ free((void *)d);
+ }
} else {
(void) printf("%6.6s ", peterbuffer);
(void) sprintf(peterbuffer, "<cycle %d>",
nlp->cycleno);
(void) printf("%-33.33s", peterbuffer);