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.
This commit is contained in:
parent
377d8c420a
commit
de169ec977
2 changed files with 7 additions and 6 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
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.
|
||||||
|
|
||||||
2004-05-31 Mark Kettenis <kettenis@gnu.org>
|
2004-05-31 Mark Kettenis <kettenis@gnu.org>
|
||||||
|
|
||||||
* i386bsd-nat.c: Don't include <sys/procfs.h>.
|
* i386bsd-nat.c: Don't include <sys/procfs.h>.
|
||||||
|
|
|
@ -886,6 +886,7 @@ mi_cmd_data_read_memory (char *command, char **argv, int argc)
|
||||||
{
|
{
|
||||||
xasprintf (&mi_error_message,
|
xasprintf (&mi_error_message,
|
||||||
"mi_cmd_data_read_memory: invalid number of columns.");
|
"mi_cmd_data_read_memory: invalid number of columns.");
|
||||||
|
return MI_CMD_ERROR;
|
||||||
}
|
}
|
||||||
/* The un-printable character when printing ascii. */
|
/* The un-printable character when printing ascii. */
|
||||||
if (argc == 6)
|
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;
|
total_bytes = word_size * nr_rows * nr_cols;
|
||||||
mbuf = xcalloc (total_bytes, 1);
|
mbuf = xcalloc (total_bytes, 1);
|
||||||
make_cleanup (xfree, mbuf);
|
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;
|
nr_bytes = 0;
|
||||||
while (nr_bytes < total_bytes)
|
while (nr_bytes < total_bytes)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue