summaryrefslogtreecommitdiff
path: root/gdb/objfiles.c
diff options
context:
space:
mode:
authorPaul Pluzhnikov <ppluzhnikov@google.com>2009-10-23 14:36:30 +0000
committerPaul Pluzhnikov <ppluzhnikov@google.com>2009-10-23 14:36:30 +0000
commit6a0fa04300e300a1df9cc137f868a91be3854225 (patch)
tree76c7bb9c5429fa1208920660389960e80d8bacb7 /gdb/objfiles.c
parent1de1372dc937099c5fdf00d9b85f08300c1bca3d (diff)
downloadbinutils-gdb-6a0fa04300e300a1df9cc137f868a91be3854225.tar.gz
2009-10-23 Paul Pluzhnikov <ppluzhnikov@google.com>
* objfiles.c (allocate_objfile): Use xzalloc.
Diffstat (limited to 'gdb/objfiles.c')
-rw-r--r--gdb/objfiles.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/gdb/objfiles.c b/gdb/objfiles.c
index 6082155c5e5..760acedfd61 100644
--- a/gdb/objfiles.c
+++ b/gdb/objfiles.c
@@ -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