From 44db85f8e2cc837d0aebe53fa662f788e4b9bbd5 Mon Sep 17 00:00:00 2001 From: Michael Snyder Date: Sat, 18 Aug 2007 19:45:48 +0000 Subject: [PATCH] 2007-08-18 Michael Snyder * ui-out.c (append_header_to_list): Possible cut and paste error. --- gdb/ChangeLog | 2 ++ gdb/ui-out.c | 9 +++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 0dbf723d45..9c3b1118a4 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,7 @@ 2007-08-18 Michael Snyder + * ui-out.c (append_header_to_list): Possible cut and paste error. + * MAINTAINERS: white space tweak. 2007-08-17 Michael Snyder diff --git a/gdb/ui-out.c b/gdb/ui-out.c index a85ca48ea6..a624e8fba1 100644 --- a/gdb/ui-out.c +++ b/gdb/ui-out.c @@ -1036,15 +1036,20 @@ append_header_to_list (struct ui_out *uiout, temphdr = XMALLOC (struct ui_out_hdr); temphdr->width = width; temphdr->alignment = alignment; - /* we have to copy the column title as the original may be an automatic */ + /* We have to copy the column title as the original may be an + automatic. */ if (colhdr != NULL) temphdr->colhdr = xstrdup (colhdr); else temphdr->colhdr = NULL; + if (col_name != NULL) + temphdr->col_name = xstrdup (col_name); + else if (colhdr != NULL) temphdr->col_name = xstrdup (colhdr); else - temphdr->col_name = xstrdup (colhdr); + temphdr->col_name = NULL; + temphdr->next = NULL; if (uiout->table.header_first == NULL) {