Remove unnecessary _bfd_new_bfd initialisation

nbfd is allocated by bfd_zmalloc.

	* opncls.c (_bfd_new_bfd): Don't init vars already zeroed.
This commit is contained in:
Alan Modra 2013-11-02 15:45:12 +10:30
parent c7c3f80e9c
commit cacce40b2d
2 changed files with 4 additions and 15 deletions

View 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

View 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;
}