aboutsummaryrefslogtreecommitdiff
path: root/gdb/mi
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2004-06-01 12:55:33 +0000
committerAndrew Cagney <cagney@redhat.com>2004-06-01 12:55:33 +0000
commitde169ec977abe9e50ab1fc388fca26e408a8b99f (patch)
treef63964cdf72e10dd2cc354726fba13b9699d0d94 /gdb/mi
parent377d8c420a27e32bb91a75e57152ca8887c70c6f (diff)
downloadgdb-de169ec977abe9e50ab1fc388fca26e408a8b99f.zip
gdb-de169ec977abe9e50ab1fc388fca26e408a8b99f.tar.gz
gdb-de169ec977abe9e50ab1fc388fca26e408a8b99f.tar.bz2
2004-06-01 Andrew Cagney <cagney@gnu.org>
* mi/mi-main.c (mi_cmd_data_read_memory): Add missing return for "invalid number of columns" error. Delete redundant "out of memory" check.
Diffstat (limited to 'gdb/mi')
-rw-r--r--gdb/mi/mi-main.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c
index 6d73861..02ed628 100644
--- a/gdb/mi/mi-main.c
+++ b/gdb/mi/mi-main.c
@@ -886,6 +886,7 @@ mi_cmd_data_read_memory (char *command, char **argv, int argc)
{
xasprintf (&mi_error_message,
"mi_cmd_data_read_memory: invalid number of columns.");
+ return MI_CMD_ERROR;
}
/* The un-printable character when printing ascii. */
if (argc == 6)
@@ -897,12 +898,6 @@ mi_cmd_data_read_memory (char *command, char **argv, int argc)
total_bytes = word_size * nr_rows * nr_cols;
mbuf = xcalloc (total_bytes, 1);
make_cleanup (xfree, mbuf);
- if (mbuf == NULL)
- {
- xasprintf (&mi_error_message,
- "mi_cmd_data_read_memory: out of memory.");
- return MI_CMD_ERROR;
- }
nr_bytes = 0;
while (nr_bytes < total_bytes)
{