Remove unnecessary _bfd_new_bfd initialisation
authorAlan Modra <amodra@gmail.com>
Sat, 2 Nov 2013 05:15:12 +0000 (15:45 +1030)
committerAlan Modra <amodra@gmail.com>
Sat, 2 Nov 2013 05:15:12 +0000 (15:45 +1030)
nbfd is allocated by bfd_zmalloc.

* opncls.c (_bfd_new_bfd): Don't init vars already zeroed.

bfd/ChangeLog
bfd/opncls.c

index 727b0bd09870274ba1fc6d24cabeb7b318f71dca..8c386aa4e1591afde0a97d7a0bdcd46ccfcaa6df 100644 (file)
@@ -1,3 +1,7 @@
+2013-11-02  Alan Modra  <amodra@gmail.com>
+
+       * opncls.c (_bfd_new_bfd): Don't init vars already zeroed.
+
 2013-11-02  Alan Modra  <amodra@gmail.com>
 
        * elf64-ppc.c (ppc64_elf_next_input_section): Always set toc_off
index 2147deec5be0a7eab77bd0aef6fccdec2c0e039e..3f09420bf735db821a88bc6395702b6f26c7e06d 100644 (file)
@@ -80,27 +80,12 @@ _bfd_new_bfd (void)
 
   nbfd->arch_info = &bfd_default_arch_struct;
 
-  nbfd->direction = no_direction;
-  nbfd->iostream = NULL;
-  nbfd->where = 0;
   if (!bfd_hash_table_init_n (& nbfd->section_htab, bfd_section_hash_newfunc,
                              sizeof (struct section_hash_entry), 13))
     {
       free (nbfd);
       return NULL;
     }
-  nbfd->sections = NULL;
-  nbfd->section_last = NULL;
-  nbfd->format = bfd_unknown;
-  nbfd->my_archive = NULL;
-  nbfd->origin = 0;
-  nbfd->opened_once = FALSE;
-  nbfd->output_has_begun = FALSE;
-  nbfd->section_count = 0;
-  nbfd->usrdata = NULL;
-  nbfd->cacheable = FALSE;
-  nbfd->flags = BFD_NO_FLAGS;
-  nbfd->mtime_set = FALSE;
 
   return nbfd;
 }