diff options
author | Michael Snyder <msnyder@vmware.com> | 2007-08-18 19:45:48 +0000 |
---|---|---|
committer | Michael Snyder <msnyder@vmware.com> | 2007-08-18 19:45:48 +0000 |
commit | 44db85f8e2cc837d0aebe53fa662f788e4b9bbd5 (patch) | |
tree | 61ec087bccd3ab24d9c8fc3b8b7739eda68a520c /gdb/ui-out.c | |
parent | a287cea67518fde78836480398ee58ae1c13bb88 (diff) | |
download | gdb-44db85f8e2cc837d0aebe53fa662f788e4b9bbd5.zip gdb-44db85f8e2cc837d0aebe53fa662f788e4b9bbd5.tar.gz gdb-44db85f8e2cc837d0aebe53fa662f788e4b9bbd5.tar.bz2 |
2007-08-18 Michael Snyder <msnyder@svkmacdonelllnx>
* ui-out.c (append_header_to_list): Possible cut and paste error.
Diffstat (limited to 'gdb/ui-out.c')
-rw-r--r-- | gdb/ui-out.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gdb/ui-out.c b/gdb/ui-out.c index a85ca48..a624e8f 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) { |