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
commitb594f032440b94def6c5b2e5b7d3c47418922797 (patch)
tree9c605b907814963114bd801ab40dd99474abe3e2 /bfd/pdp11.c
parentefbc9266f21923c9d331e31cbbd65f3aa57a9225 (diff)
downloadbinutils-redhat-b594f032440b94def6c5b2e5b7d3c47418922797.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 d4fe79eba6..90db56b987 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)
{