+2016-11-08 Pedro Alves <palves@redhat.com>
+
+ * cli/cli-script.c (execute_control_command): Assume insert_args
+ never returns NULL.
+ (insert_args): Assume xmalloc never returns NULL.
+
2016-11-08 Pedro Alves <palves@redhat.com>
* Makefile.in (COMMON_OBS): Add utils-selftests.o.
case simple_control:
/* A simple command, execute it and return. */
new_line = insert_args (cmd->line);
- if (!new_line)
- break;
make_cleanup (free_current_contents, &new_line);
execute_command (new_line, 0);
ret = cmd->control_type;
/* Parse the loop control expression for the while statement. */
new_line = insert_args (cmd->line);
- if (!new_line)
- break;
make_cleanup (free_current_contents, &new_line);
expr = parse_expression (new_line);
make_cleanup (free_current_contents, &expr);
print_command_trace (buffer);
new_line = insert_args (cmd->line);
- if (!new_line)
- break;
make_cleanup (free_current_contents, &new_line);
/* Parse the conditional for the if statement. */
expr = parse_expression (new_line);
/* Breakpoint commands list, record the commands in the
breakpoint's command list and return. */
new_line = insert_args (cmd->line);
- if (!new_line)
- break;
make_cleanup (free_current_contents, &new_line);
ret = commands_from_control_command (new_line, cmd);
break;
else if (i >= user_args->count)
{
error (_("Missing argument %d in user function."), i);
- return NULL;
}
else
{
/* Allocate space for the new line and fill it in. */
new_line = (char *) xmalloc (len + 1);
- if (new_line == NULL)
- return NULL;
/* Restore pointer to beginning of old line. */
line = save_line;