Replace some xmalloc-family functions with XNEW-family ones
[deliverable/binutils-gdb.git] / gdb / infcmd.c
index 393ccb9a079975ba7c38476c89f25a177407fced..bdde49dc22ff5762d1a5c2293dba39f46f8f204a 100644 (file)
@@ -1121,9 +1121,9 @@ step_once (int skip_subroutines, int single_inst, int count, int thread)
         further stepping.  */
       if (target_can_async_p ())
        {
-         struct step_1_continuation_args *args;
+         struct step_1_continuation_args *args =
+           XNEW (struct step_1_continuation_args);
 
-         args = xmalloc (sizeof (*args));
          args->skip_subroutines = skip_subroutines;
          args->single_inst = single_inst;
          args->count = count;
@@ -1790,7 +1790,7 @@ finish_forward (struct symbol *function, struct frame_info *frame)
 
   /* We want to print return value, please...  */
   tp->control.proceed_to_finish = 1;
-  cargs = xmalloc (sizeof (*cargs));
+  cargs = XNEW (struct finish_command_continuation_args);
 
   cargs->thread = thread;
   cargs->breakpoint = breakpoint;
@@ -2677,7 +2677,7 @@ attach_command (char *args, int from_tty)
          /* sync_execution mode.  Wait for stop.  */
          struct attach_command_continuation_args *a;
 
-         a = xmalloc (sizeof (*a));
+         a = XNEW (struct attach_command_continuation_args);
          a->args = xstrdup (args);
          a->from_tty = from_tty;
          a->async_exec = async_exec;
@@ -2745,7 +2745,7 @@ notice_new_inferior (ptid_t ptid, int leave_running, int from_tty)
        {
          struct attach_command_continuation_args *a;
 
-         a = xmalloc (sizeof (*a));
+         a = XNEW (struct attach_command_continuation_args);
          a->args = xstrdup ("");
          a->from_tty = from_tty;
          a->async_exec = async_exec;
This page took 0.025379 seconds and 4 git commands to generate.