Print this page
cleanup
@@ -526,11 +526,11 @@
}
void
print_demangled_name(int n, nltype *selfp)
{
- char *c = demangled_name(selfp);
+ char *c = (char *)demangled_name(selfp);
int i;
if (c == selfp->name)
return;
@@ -537,11 +537,11 @@
(void) printf("\n");
for (i = 1; i < n; i++)
(void) printf(" ");
(void) printf("[%s]", selfp->name);
- free((void *)c);
+ free(c);
}
void
sortchildren(nltype *parentp)
{
@@ -1038,17 +1038,20 @@
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
+ } else {
(void) printf("%6.6s %s\n", peterbuffer,
d);
+ }
- if (d != nlp->name)
+ 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);