2009-10-23 Paul Pluzhnikov <ppluzhnikov@google.com>

* objfiles.c (allocate_objfile): Use xzalloc.
This commit is contained in:
Paul Pluzhnikov 2009-10-23 14:36:30 +00:00
parent 1de1372dc9
commit 6a0fa04300
2 changed files with 9 additions and 2 deletions

View File

@ -1,3 +1,7 @@
2009-10-23 Paul Pluzhnikov <ppluzhnikov@google.com>
* objfiles.c (allocate_objfile): Use xzalloc.
2009-10-23 Hui Zhu <teawater@gmail.com>
* record.c (record_restore): Use phex_nz.
@ -11,6 +15,10 @@
* objfiles.c (allocate_objfile): Remove useless test. Move
declaration of last_one to the block that uses it.
2009-10-22 Paul Pluzhnikov <ppluzhnikov@google.com>
* record.c (record_restore, cmd_record_save): Fix warnings.
2009-10-22 Paul Pluzhnikov <ppluzhnikov@google.com>
* disasm.h (DISASSEMBLY_OMIT_FNAME) New define.

View File

@ -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