aboutsummaryrefslogtreecommitdiff
path: root/bfd/aoutx.h
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2002-06-07 15:04:49 +0000
committerAlan Modra <amodra@gmail.com>2002-06-07 15:04:49 +0000
commit9bab7074b06e5c0661db3ec95c584ff221fc61ec (patch)
treee018b581bbf2801ccb49cdcef5de6066b63c2a21 /bfd/aoutx.h
parent9758f3fc77f7b9748293b7e265d362ceaddfdfb4 (diff)
downloadgdb-9bab7074b06e5c0661db3ec95c584ff221fc61ec.zip
gdb-9bab7074b06e5c0661db3ec95c584ff221fc61ec.tar.gz
gdb-9bab7074b06e5c0661db3ec95c584ff221fc61ec.tar.bz2
Replace bfd_alloc/bfd_malloc + memset with bfd_zalloc/bfd_zmalloc
Diffstat (limited to 'bfd/aoutx.h')
-rw-r--r--bfd/aoutx.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/bfd/aoutx.h b/bfd/aoutx.h
index 3c9cd4f..c2448f4 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)