aboutsummaryrefslogtreecommitdiff
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/tekhex.c
parent * symbols.c: Replace CONST by const throughout. (diff)
downloadbinutils-gdb-9bab7074b06e5c0661db3ec95c584ff221fc61ec.tar.gz
binutils-gdb-9bab7074b06e5c0661db3ec95c584ff221fc61ec.tar.bz2
binutils-gdb-9bab7074b06e5c0661db3ec95c584ff221fc61ec.zip
Replace bfd_alloc/bfd_malloc + memset with bfd_zalloc/bfd_zmalloc
Diffstat (limited to 'bfd/tekhex.c')
-rw-r--r--bfd/tekhex.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/bfd/tekhex.c b/bfd/tekhex.c
index 8efd401dbda..034ef28b867 100644
--- a/bfd/tekhex.c
+++ b/bfd/tekhex.c
@@ -354,17 +354,13 @@ find_chunk (abfd, vma)
}
if (!d)
{
- char *sname = bfd_alloc (abfd, (bfd_size_type) 12);
-
/* No chunk for this address, so make one up */
d = ((struct data_struct *)
- bfd_alloc (abfd, (bfd_size_type) sizeof (struct data_struct)));
+ bfd_zalloc (abfd, (bfd_size_type) sizeof (struct data_struct)));
- if (!sname || !d)
+ if (!d)
return NULL;
- memset (d->chunk_init, 0, CHUNK_MASK + 1);
- memset (d->chunk_data, 0, CHUNK_MASK + 1);
d->next = abfd->tdata.tekhex_data->data;
d->vma = vma;
abfd->tdata.tekhex_data->data = d;