From: Paul Pluzhnikov <ppluzhnikov@google.com>
To: Tristan Gingold <gingold@adacore.com>
Cc: Pedro Alves <pedro@codesourcery.com>, gdb-patches@sourceware.org
Subject: Re: [RFA] little cleanup in allocate_objfile
Date: Fri, 23 Oct 2009 14:37:00 -0000 [thread overview]
Message-ID: <8ac60eac0910230736o6072b2c0kff32e4d4662e6466@mail.gmail.com> (raw)
In-Reply-To: <2D19DCE7-F7F3-4B20-B809-FC1C914644F8@adacore.com>
On Fri, Oct 23, 2009 at 6:23 AM, Tristan Gingold <gingold@adacore.com> wrote:
> Thanks, committed.
I've checked in the patch below under the obvious rule.
Thanks,
--
Paul Pluzhnikov
2009-10-23 Paul Pluzhnikov <ppluzhnikov@google.com>
* objfiles.c (allocate_objfile): Use xzalloc.
Index: objfiles.c
===================================================================
RCS file: /cvs/src/src/gdb/objfiles.c,v
retrieving revision 1.101
diff -u -p -u -r1.101 objfiles.c
--- objfiles.c 23 Oct 2009 13:22:46 -0000 1.101
+++ objfiles.c 23 Oct 2009 14:31:27 -0000
@@ -196,8 +196,7 @@ allocate_objfile (bfd *abfd, int flags)
{
struct objfile *objfile;
- objfile = (struct objfile *) xmalloc (sizeof (struct objfile));
- memset (objfile, 0, sizeof (struct objfile));
+ objfile = (struct objfile *) xzalloc (sizeof (struct objfile));
objfile->psymbol_cache = bcache_xmalloc ();
objfile->macro_cache = bcache_xmalloc ();
/* We could use obstack_specify_allocation here instead, but
prev parent reply other threads:[~2009-10-23 14:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-23 12:43 Tristan Gingold
2009-10-23 13:13 ` Pedro Alves
2009-10-23 13:23 ` Tristan Gingold
2009-10-23 14:37 ` Paul Pluzhnikov [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8ac60eac0910230736o6072b2c0kff32e4d4662e6466@mail.gmail.com \
--to=ppluzhnikov@google.com \
--cc=gdb-patches@sourceware.org \
--cc=gingold@adacore.com \
--cc=pedro@codesourcery.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox