]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Use XCNEW rather than xcalloc (1, ...) in linux-x86-low.c
authorGary Benson <gbenson@redhat.com>
Tue, 2 Sep 2014 15:28:54 +0000 (16:28 +0100)
committerGary Benson <gbenson@redhat.com>
Tue, 2 Sep 2014 15:31:20 +0000 (16:31 +0100)
This commit replaces two uses of xcalloc (1, ...) with XCNEW.

gdb/gdbserver/ChangeLog:

* linux-x86-low.c (x86_linux_new_process): Use XCNEW.
(x86_linux_new_thread): Likewise.

gdb/gdbserver/ChangeLog
gdb/gdbserver/linux-x86-low.c

index caa243da5d7d489a0dc827e970c2007dd994e9ea..b1e81178b105e939c8ea4c80a776d088e854354b 100644 (file)
@@ -1,3 +1,8 @@
+2014-09-02  Gary Benson  <gbenson@redhat.com>
+
+       * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
+       (x86_linux_new_thread): Likewise.
+
 2014-08-29  Gary Benson  <gbenson@redhat.com>
 
        * server.h (setjmp.h): Do not include.
index 5175019e83c61b7f6dd8cf1e64e27cfe6edc6184..8666f6f6d09fc66ba66aded0c8d2fbff9c2d4746 100644 (file)
@@ -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;