mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-05-24 02:37:23 +08:00
* target-descriptions.c (tdesc_create_reg): Do not set reg->type
to NULL. * cli/cli-script.c (build_command_line): Update NULL check.
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user