From patchwork Tue Sep 2 15:32:34 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gary Benson X-Patchwork-Id: 2628 Received: (qmail 28561 invoked by alias); 2 Sep 2014 15:32:40 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 28371 invoked by uid 89); 2 Sep 2014 15:32:38 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 02 Sep 2014 15:32:37 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s82FWabq006939 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Tue, 2 Sep 2014 11:32:36 -0400 Received: from blade.nx (ovpn-116-113.ams2.redhat.com [10.36.116.113]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s82FWZ6Q021083 for ; Tue, 2 Sep 2014 11:32:36 -0400 Received: from blade.nx (localhost [127.0.0.1]) by blade.nx (Postfix) with ESMTP id E0F372640DA for ; Tue, 2 Sep 2014 16:32:34 +0100 (BST) From: Gary Benson To: gdb-patches@sourceware.org Subject: [OB PATCH] Use XCNEW rather than xcalloc (1, ...) in linux-x86-low.c Date: Tue, 2 Sep 2014 16:32:34 +0100 Message-Id: <1409671954-26912-1-git-send-email-gbenson@redhat.com> X-IsSubscribed: yes 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;