aboutsummaryrefslogtreecommitdiff
path: root/gdb/cli/cli-setshow.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/cli/cli-setshow.c')
-rw-r--r--gdb/cli/cli-setshow.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/cli/cli-setshow.c b/gdb/cli/cli-setshow.c
index 8d01b52..ca41d8e 100644
--- a/gdb/cli/cli-setshow.c
+++ b/gdb/cli/cli-setshow.c
@@ -475,8 +475,8 @@ do_set_command (const char *arg, int from_tty, struct cmd_list_element *c)
p = p->prefix;
}
- cp = name = xmalloc (length);
- cmds = xmalloc (sizeof (struct cmd_list_element *) * i);
+ cp = name = (char *) xmalloc (length);
+ cmds = XNEWVEC (struct cmd_list_element *, i);
/* Track back through filed 'prefix' and cache them in CMDS. */
for (i = 0, p = c; p != NULL; i++)