From 6a0fa04300e300a1df9cc137f868a91be3854225 Mon Sep 17 00:00:00 2001 From: Paul Pluzhnikov Date: Fri, 23 Oct 2009 14:36:30 +0000 Subject: 2009-10-23 Paul Pluzhnikov * objfiles.c (allocate_objfile): Use xzalloc. --- gdb/objfiles.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'gdb/objfiles.c') 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 -- cgit v1.2.1