diff options
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; } |