aboutsummaryrefslogtreecommitdiff
path: root/gdb/printcmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/printcmd.c')
-rw-r--r--gdb/printcmd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/printcmd.c b/gdb/printcmd.c
index 553cc71..5729b24 100644
--- a/gdb/printcmd.c
+++ b/gdb/printcmd.c
@@ -1534,7 +1534,7 @@ display_command (char *arg, int from_tty)
innermost_block = NULL;
expr = parse_expression (exp);
- newobj = (struct display *) xmalloc (sizeof (struct display));
+ newobj = XNEW (struct display);
newobj->exp_string = xstrdup (exp);
newobj->exp = expr;
@@ -2256,7 +2256,7 @@ ui_printf (const char *arg, struct ui_file *stream)
int allocated_args = 20;
struct cleanup *old_cleanups;
- val_args = xmalloc (allocated_args * sizeof (struct value *));
+ val_args = XNEWVEC (struct value *, allocated_args);
old_cleanups = make_cleanup (free_current_contents, &val_args);
if (s == 0)