diff options
author | Alan Modra <amodra@bigpond.net.au> | 2002-06-07 15:04:49 +0000 |
---|---|---|
committer | Alan Modra <amodra@bigpond.net.au> | 2002-06-07 15:04:49 +0000 |
commit | 10de1cbaf381d28993e64086215310eaf63c2ef9 (patch) | |
tree | c41bd39cc9e8c13aa0111bcc298b70781a8e164c /bfd/aoutx.h | |
parent | 4fa8d0495f811c9d58fbdac2da08acc29b44d4fe (diff) | |
download | gdb-10de1cbaf381d28993e64086215310eaf63c2ef9.tar.gz |
Replace bfd_alloc/bfd_malloc + memset with bfd_zalloc/bfd_zmalloc
Diffstat (limited to 'bfd/aoutx.h')
-rw-r--r-- | bfd/aoutx.h | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/bfd/aoutx.h b/bfd/aoutx.h index 3c9cd4fafc8..c2448f4a575 100644 --- a/bfd/aoutx.h +++ b/bfd/aoutx.h @@ -1837,11 +1837,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) @@ -2411,10 +2409,9 @@ NAME(aout,slurp_reloc_table) (abfd, asect, symbols) count = reloc_size / each_size; amt = count * sizeof (arelent); - reloc_cache = (arelent *) bfd_malloc (amt); + reloc_cache = (arelent *) bfd_zmalloc (amt); if (reloc_cache == NULL && count != 0) return false; - memset (reloc_cache, 0, (size_t) amt); relocs = bfd_malloc (reloc_size); if (relocs == NULL && reloc_size != 0) |