aboutsummaryrefslogtreecommitdiff
path: root/bfd/sunos.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2002-06-07 15:04:49 +0000
committerAlan Modra <amodra@gmail.com>2002-06-07 15:04:49 +0000
commit9bab7074b06e5c0661db3ec95c584ff221fc61ec (patch)
treee018b581bbf2801ccb49cdcef5de6066b63c2a21 /bfd/sunos.c
parent9758f3fc77f7b9748293b7e265d362ceaddfdfb4 (diff)
downloadgdb-9bab7074b06e5c0661db3ec95c584ff221fc61ec.zip
gdb-9bab7074b06e5c0661db3ec95c584ff221fc61ec.tar.gz
gdb-9bab7074b06e5c0661db3ec95c584ff221fc61ec.tar.bz2
Replace bfd_alloc/bfd_malloc + memset with bfd_zalloc/bfd_zmalloc
Diffstat (limited to 'bfd/sunos.c')
-rw-r--r--bfd/sunos.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/bfd/sunos.c b/bfd/sunos.c
index 7825a82..5fec6f9 100644
--- a/bfd/sunos.c
+++ b/bfd/sunos.c
@@ -1434,10 +1434,9 @@ bfd_sunos_size_dynamic_sections (output_bfd, info, sdynptr, sneedptr,
s = bfd_get_section_by_name (dynobj, ".hash");
BFD_ASSERT (s != NULL);
hashalloc = (dynsymcount + bucketcount - 1) * HASH_ENTRY_SIZE;
- s->contents = (bfd_byte *) bfd_alloc (dynobj, hashalloc);
+ s->contents = (bfd_byte *) bfd_zalloc (dynobj, hashalloc);
if (s->contents == NULL && dynsymcount > 0)
return false;
- memset (s->contents, 0, (size_t) hashalloc);
for (i = 0; i < bucketcount; i++)
PUT_WORD (output_bfd, (bfd_vma) -1, s->contents + i * HASH_ENTRY_SIZE);
s->_raw_size = bucketcount * HASH_ENTRY_SIZE;