From b594f032440b94def6c5b2e5b7d3c47418922797 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Fri, 7 Jun 2002 15:04:49 +0000 Subject: Replace bfd_alloc/bfd_malloc + memset with bfd_zalloc/bfd_zmalloc --- bfd/pdp11.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'bfd/pdp11.c') 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) { -- cgit v1.2.1