diff options
author | Daniel Jacobowitz <dan@debian.org> | 2007-07-03 01:23:01 +0000 |
---|---|---|
committer | Daniel Jacobowitz <dan@debian.org> | 2007-07-03 01:23:01 +0000 |
commit | cadf451d52ea63cfea07dc93ffeca451dbb0b0ff (patch) | |
tree | 67520e29d29a6bd2ced7ed72bd124adeba038195 /gdb/cli/cli-script.c | |
parent | 5f6bbf4c096fa264ba6d338586e32bd0b370e9e3 (diff) | |
download | gdb-cadf451d52ea63cfea07dc93ffeca451dbb0b0ff.tar.gz |
* 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 2dff85e69da..59160081869 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; } |