summaryrefslogtreecommitdiff
path: root/bfd/tekhex.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/tekhex.c')
-rw-r--r--bfd/tekhex.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/bfd/tekhex.c b/bfd/tekhex.c
index 4391da18441..19dcb875597 100644
--- a/bfd/tekhex.c
+++ b/bfd/tekhex.c
@@ -242,7 +242,7 @@ tekhex_init ()
static boolean inited = false;
int val;
- if (inited == false)
+ if (! inited)
{
inited = true;
hex_init ();
@@ -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;
@@ -489,7 +485,7 @@ pass_over (abfd, func)
/* To the front of the file */
if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0)
abort ();
- while (eof == false)
+ while (! eof)
{
char buffer[MAXCHUNK];
char *src = buffer;
@@ -681,7 +677,7 @@ tekhex_set_section_contents (abfd, section, locationp, offset, bytes_to_do)
bfd_size_type bytes_to_do;
{
- if (abfd->output_has_begun == false)
+ if (! abfd->output_has_begun)
{
/* The first time around, allocate enough sections to hold all the chunks */
asection *s = abfd->sections;
@@ -1005,6 +1001,7 @@ tekhex_print_symbol (abfd, filep, symbol, how)
#define tekhex_bfd_relax_section bfd_generic_relax_section
#define tekhex_bfd_gc_sections bfd_generic_gc_sections
#define tekhex_bfd_merge_sections bfd_generic_merge_sections
+#define tekhex_bfd_discard_group bfd_generic_discard_group
#define tekhex_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
#define tekhex_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
#define tekhex_bfd_link_add_symbols _bfd_generic_link_add_symbols