diff options
Diffstat (limited to 'gdb/gdbserver/inferiors.c')
-rw-r--r-- | gdb/gdbserver/inferiors.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/gdb/gdbserver/inferiors.c b/gdb/gdbserver/inferiors.c index ce87d8c0a55..21f45fadf31 100644 --- a/gdb/gdbserver/inferiors.c +++ b/gdb/gdbserver/inferiors.c @@ -105,9 +105,7 @@ remove_inferior (struct inferior_list *list, struct thread_info * add_thread (ptid_t thread_id, void *target_data) { - struct thread_info *new_thread = xmalloc (sizeof (*new_thread)); - - memset (new_thread, 0, sizeof (*new_thread)); + struct thread_info *new_thread = XCNEW (struct thread_info); new_thread->entry.id = thread_id; new_thread->last_resume_kind = resume_continue; @@ -274,9 +272,7 @@ clear_inferiors (void) struct process_info * add_process (int pid, int attached) { - struct process_info *process; - - process = xcalloc (1, sizeof (*process)); + struct process_info *process = XCNEW (struct process_info); process->entry.id = pid_to_ptid (pid); process->attached = attached; |