summaryrefslogtreecommitdiff
path: root/bfd/tekhex.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/tekhex.c
parentefbc9266f21923c9d331e31cbbd65f3aa57a9225 (diff)
downloadbinutils-redhat-b594f032440b94def6c5b2e5b7d3c47418922797.tar.gz
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 8efd401dbd..034ef28b86 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;