summaryrefslogtreecommitdiff
path: root/bfd/pdp11.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/pdp11.c
parent4fa8d0495f811c9d58fbdac2da08acc29b44d4fe (diff)
downloadgdb-10de1cbaf381d28993e64086215310eaf63c2ef9.tar.gz
Replace bfd_alloc/bfd_malloc + memset with bfd_zalloc/bfd_zmalloc
Diffstat (limited to 'bfd/pdp11.c')
-rw-r--r--bfd/pdp11.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/bfd/pdp11.c b/bfd/pdp11.c
index d4fe79eba65..90db56b9875 100644
--- a/bfd/pdp11.c
+++ b/bfd/pdp11.c
@@ -1841,11 +1841,9 @@ NAME(aout,slurp_symbol_table) (abfd)
cached_size = obj_aout_external_sym_count (abfd);
cached_size *= sizeof (aout_symbol_type);
- cached = (aout_symbol_type *) bfd_malloc (cached_size);
+ cached = (aout_symbol_type *) bfd_zmalloc (cached_size);
if (cached == NULL && cached_size != 0)
return false;
- if (cached_size != 0)
- memset (cached, 0, (size_t) cached_size);
/* Convert from external symbol information to internal. */
if (! (NAME(aout,translate_symbol_table)
@@ -2255,10 +2253,9 @@ NAME(aout,slurp_reloc_table) (abfd, asect, symbols)
count = real_count;
}
- reloc_cache = (arelent *) bfd_malloc (count * sizeof (arelent));
+ reloc_cache = (arelent *) bfd_zmalloc (count * sizeof (arelent));
if (reloc_cache == NULL && count != 0)
return false;
- memset (reloc_cache, 0, (size_t) count * sizeof (arelent));
cache_ptr = reloc_cache;
@@ -2319,8 +2316,6 @@ NAME(aout,squirt_out_relocs) (abfd, section)
if (!native)
return false;
- memset ((PTR)native, 0, (size_t) natsize);
-
generic = section->orelocation;
if (generic != NULL)
{