aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorAndreas Arnez <arnez@linux.vnet.ibm.com>2016-11-09 13:02:13 +0100
committerAndreas Arnez <arnez@linux.vnet.ibm.com>2016-11-09 13:02:13 +0100
commit8c84bffb45ac63b98fffc5c1a492c2eb7e4f27e2 (patch)
tree5a5c0dde004c174da159b286fd4750319dc9ea27 /gdb
parent7bc2c8b83ea82b4315c67e7658af815aed062e73 (diff)
downloadgdb-8c84bffb45ac63b98fffc5c1a492c2eb7e4f27e2.zip
gdb-8c84bffb45ac63b98fffc5c1a492c2eb7e4f27e2.tar.gz
gdb-8c84bffb45ac63b98fffc5c1a492c2eb7e4f27e2.tar.bz2
tui-winsource: Remove failed-allocation logic
This removes dead code in tui_alloc_source_buffer for handling a NULL return value from xmalloc. gdb/ChangeLog: * tui/tui-winsource.c (tui_alloc_source_buffer): Remove failed-xmalloc handling.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/tui/tui-winsource.c15
2 files changed, 5 insertions, 15 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index d6b8b47..2f0f3c2 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2016-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
+ * tui/tui-winsource.c (tui_alloc_source_buffer): Remove
+ failed-xmalloc handling.
+
+2016-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
+
* tui/tui-winsource.c (tui_alloc_source_buffer): Subtract
highlight box's overhead when calculating the content height.
diff --git a/gdb/tui/tui-winsource.c b/gdb/tui/tui-winsource.c
index 4a82ae4..8bbce83 100644
--- a/gdb/tui/tui-winsource.c
+++ b/gdb/tui/tui-winsource.c
@@ -618,23 +618,8 @@ tui_alloc_source_buffer (struct tui_win_info *win_info)
{
src_line_buf = (char *)
xmalloc ((max_lines * line_width) * sizeof (char));
- if (src_line_buf == (char *) NULL)
- {
- fputs_unfiltered ("Unable to Allocate Memory for "
- "Source or Disassembly Display.\n",
- gdb_stderr);
- return TUI_FAILURE;
- }
/* Allocate the content list. */
win_info->generic.content = tui_alloc_content (max_lines, SRC_WIN);
- if (win_info->generic.content == NULL)
- {
- xfree (src_line_buf);
- fputs_unfiltered ("Unable to Allocate Memory for "
- "Source or Disassembly Display.\n",
- gdb_stderr);
- return TUI_FAILURE;
- }
for (i = 0; i < max_lines; i++)
win_info->generic.content[i]->which_element.source.line
= src_line_buf + (line_width * i);