+2021-05-17 Simon Marchi <simon.marchi@polymtl.ca>
+
+ * cli/cli-decode.c (add_alias_cmd): Don't handle old == 0.
+
2021-05-17 Simon Marchi <simon.marchi@polymtl.ca>
* cli/cli-decode.h (prefixname): Make const, move implementation
enum command_class theclass, int abbrev_flag,
struct cmd_list_element **list)
{
- if (old == 0)
- {
- struct cmd_list_element *prehook, *prehookee, *posthook, *posthookee;
- struct cmd_list_element *aliases = delete_cmd (name, list,
- &prehook, &prehookee,
- &posthook, &posthookee);
-
- /* If this happens, it means a programmer error somewhere. */
- gdb_assert (!aliases && !prehook && !prehookee
- && !posthook && ! posthookee);
- return 0;
- }
+ gdb_assert (old != nullptr);
struct cmd_list_element *c = add_cmd (name, theclass, old->doc, list);