2009-10-23 Paul Pluzhnikov <ppluzhnikov@google.com>
authorPaul Pluzhnikov <ppluzhnikov@google.com>
Fri, 23 Oct 2009 14:36:30 +0000 (14:36 +0000)
committerPaul Pluzhnikov <ppluzhnikov@google.com>
Fri, 23 Oct 2009 14:36:30 +0000 (14:36 +0000)
* objfiles.c (allocate_objfile): Use xzalloc.

gdb/ChangeLog
gdb/objfiles.c

index 0911bb7b5f8ac0ad4e9a8a8d20cc7c1cde62f7ec..5ef3f9622845fb4e20c586bb5406bedbfe0b68d9 100644 (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.
        * 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.
index 6082155c5e502c551d0268d11867f0222265d9a8..760acedfd61e3ee3a0634b474cc385907389e6a2 100644 (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