summaryrefslogtreecommitdiff
path: root/bfd/cofflink.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2002-06-07 15:04:49 +0000
committerAlan Modra <amodra@bigpond.net.au>2002-06-07 15:04:49 +0000
commit10de1cbaf381d28993e64086215310eaf63c2ef9 (patch)
treec41bd39cc9e8c13aa0111bcc298b70781a8e164c /bfd/cofflink.c
parent4fa8d0495f811c9d58fbdac2da08acc29b44d4fe (diff)
downloadgdb-10de1cbaf381d28993e64086215310eaf63c2ef9.tar.gz
Replace bfd_alloc/bfd_malloc + memset with bfd_zalloc/bfd_zmalloc
Diffstat (limited to 'bfd/cofflink.c')
-rw-r--r--bfd/cofflink.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/bfd/cofflink.c b/bfd/cofflink.c
index 1eac3c58ce8..32200a83a63 100644
--- a/bfd/cofflink.c
+++ b/bfd/cofflink.c
@@ -342,12 +342,10 @@ coff_link_add_symbols (abfd, info)
/* We keep a list of the linker hash table entries that correspond
to particular symbols. */
amt = symcount * sizeof (struct coff_link_hash_entry *);
- sym_hash = (struct coff_link_hash_entry **) bfd_alloc (abfd, amt);
+ sym_hash = (struct coff_link_hash_entry **) bfd_zalloc (abfd, amt);
if (sym_hash == NULL && symcount != 0)
goto error_return;
obj_coff_sym_hashes (abfd) = sym_hash;
- memset (sym_hash, 0,
- (size_t) symcount * sizeof (struct coff_link_hash_entry *));
symesz = bfd_coff_symesz (abfd);
BFD_ASSERT (symesz == bfd_coff_auxesz (abfd));