diff options
author | Daniel Jacobowitz <drow@false.org> | 2007-07-03 01:23:01 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2007-07-03 01:23:01 +0000 |
commit | c8c122932061ba5c68cc6893262990463162de1c (patch) | |
tree | 5b0145f6985180ebca57de83a9c9263c6ccc3408 /gdb/cli/cli-script.c | |
parent | 7877e97730123929da00a6fd91c7b8257f26d027 (diff) | |
download | gdb-c8c122932061ba5c68cc6893262990463162de1c.zip gdb-c8c122932061ba5c68cc6893262990463162de1c.tar.gz gdb-c8c122932061ba5c68cc6893262990463162de1c.tar.bz2 |
* target-descriptions.c (tdesc_create_reg): Do not set reg->type
to NULL.
* cli/cli-script.c (build_command_line): Update NULL check.
Diffstat (limited to 'gdb/cli/cli-script.c')
-rw-r--r-- | gdb/cli/cli-script.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/cli/cli-script.c b/gdb/cli/cli-script.c index 2dff85e..5916008 100644 --- a/gdb/cli/cli-script.c +++ b/gdb/cli/cli-script.c @@ -85,6 +85,7 @@ build_command_line (enum command_control_type type, char *args) if (args == NULL && (type == if_control || type == while_control)) error (_("if/while commands require arguments.")); + gdb_assert (args != NULL); cmd = (struct command_line *) xmalloc (sizeof (struct command_line)); cmd->next = NULL; @@ -95,8 +96,7 @@ build_command_line (enum command_control_type type, char *args) = (struct command_line **) xmalloc (sizeof (struct command_line *) * cmd->body_count); memset (cmd->body_list, 0, sizeof (struct command_line *) * cmd->body_count); - if (args != NULL) - cmd->line = savestring (args, strlen (args)); + cmd->line = savestring (args, strlen (args)); return cmd; } |