This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[OB PATCH] Use XCNEW rather than xcalloc (1, ...) in linux-x86-low.c
- From: Gary Benson <gbenson at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Tue, 2 Sep 2014 16:32:34 +0100
- Subject: [OB PATCH] Use XCNEW rather than xcalloc (1, ...) in linux-x86-low.c
- Authentication-results: sourceware.org; auth=none
Hi all,
This commit replaces two uses of xcalloc (1, ...) with XCNEW.
Thanks,
Gary
--
gdb/gdbserver/ChangeLog:
* linux-x86-low.c (x86_linux_new_process): Use XCNEW.
(x86_linux_new_thread): Likewise.
---
gdb/gdbserver/ChangeLog | 5 +++++
gdb/gdbserver/linux-x86-low.c | 4 ++--
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/gdb/gdbserver/linux-x86-low.c b/gdb/gdbserver/linux-x86-low.c
index 5175019..8666f6f 100644
--- a/gdb/gdbserver/linux-x86-low.c
+++ b/gdb/gdbserver/linux-x86-low.c
@@ -749,7 +749,7 @@ x86_stopped_data_address (void)
static struct arch_process_info *
x86_linux_new_process (void)
{
- struct arch_process_info *info = xcalloc (1, sizeof (*info));
+ struct arch_process_info *info = XCNEW (struct arch_process_info);
i386_low_init_dregs (&info->debug_reg_state);
@@ -761,7 +761,7 @@ x86_linux_new_process (void)
static struct arch_lwp_info *
x86_linux_new_thread (void)
{
- struct arch_lwp_info *info = xcalloc (1, sizeof (*info));
+ struct arch_lwp_info *info = XCNEW (struct arch_lwp_info);
info->debug_registers_changed = 1;
--
1.7.1