diff options
Diffstat (limited to 'gdb/dwarf2expr.c')
-rw-r--r-- | gdb/dwarf2expr.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gdb/dwarf2expr.c b/gdb/dwarf2expr.c index 862a753..09b56b6 100644 --- a/gdb/dwarf2expr.c +++ b/gdb/dwarf2expr.c @@ -94,11 +94,10 @@ new_dwarf_expr_context (void) { struct dwarf_expr_context *retval; - retval = xcalloc (1, sizeof (struct dwarf_expr_context)); + retval = XCNEW (struct dwarf_expr_context); retval->stack_len = 0; retval->stack_allocated = 10; - retval->stack = xmalloc (retval->stack_allocated - * sizeof (struct dwarf_stack_value)); + retval->stack = XNEWVEC (struct dwarf_stack_value, retval->stack_allocated); retval->num_pieces = 0; retval->pieces = 0; retval->max_recursion_depth = 0x100; |