summaryrefslogtreecommitdiff
path: root/bfd/vms-gsd.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/vms-gsd.c
parent4fa8d0495f811c9d58fbdac2da08acc29b44d4fe (diff)
downloadgdb-10de1cbaf381d28993e64086215310eaf63c2ef9.tar.gz
Replace bfd_alloc/bfd_malloc + memset with bfd_zalloc/bfd_zmalloc
Diffstat (limited to 'bfd/vms-gsd.c')
-rw-r--r--bfd/vms-gsd.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/bfd/vms-gsd.c b/bfd/vms-gsd.c
index d9dcd785789..002412232dc 100644
--- a/bfd/vms-gsd.c
+++ b/bfd/vms-gsd.c
@@ -426,13 +426,12 @@ _bfd_vms_slurp_gsd (abfd, objtype)
else
{
section->contents = ((unsigned char *)
- bfd_malloc (section->_raw_size));
+ bfd_zmalloc (section->_raw_size));
if (section->contents == NULL)
{
bfd_set_error (bfd_error_no_memory);
return -1;
}
- memset (section->contents, 0, (size_t) section->_raw_size);
}
section->_cooked_size = section->_raw_size;
#if VMS_DEBUG
@@ -618,10 +617,9 @@ _bfd_vms_slurp_gsd (abfd, objtype)
section->vma = (bfd_vma)base_addr;
base_addr += section->_raw_size;
section->contents = ((unsigned char *)
- bfd_malloc (section->_raw_size));
+ bfd_zmalloc (section->_raw_size));
if (section->contents == NULL)
return -1;
- memset (section->contents, 0, (size_t) section->_raw_size);
section->_cooked_size = section->_raw_size;
#if VMS_DEBUG
vms_debug(4, "egsd psc %d (%s, flags %04x=%s) ",