mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-21 02:24:17 +08:00
* targets.c (bfd_target_list): Don't return the default target twice.
This commit is contained in:
@ -1,3 +1,7 @@
|
|||||||
|
2002-10-21 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
|
* targets.c (bfd_target_list): Don't return the default target twice.
|
||||||
|
|
||||||
2002-10-21 Elias Athanasopoulos <eathan@otenet.gr>
|
2002-10-21 Elias Athanasopoulos <eathan@otenet.gr>
|
||||||
|
|
||||||
* archive.c (_bfd_archive_bsd_update_armap_timestamp): Replace
|
* archive.c (_bfd_archive_bsd_update_armap_timestamp): Replace
|
||||||
|
@ -1273,14 +1273,17 @@ bfd_target_list ()
|
|||||||
vec_length++;
|
vec_length++;
|
||||||
|
|
||||||
amt = (vec_length + 1) * sizeof (char **);
|
amt = (vec_length + 1) * sizeof (char **);
|
||||||
name_ptr = name_list = (const char **) bfd_zmalloc (amt);
|
name_ptr = name_list = (const char **) bfd_malloc (amt);
|
||||||
|
|
||||||
if (name_list == NULL)
|
if (name_list == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
for (target = &bfd_target_vector[0]; *target != NULL; target++)
|
for (target = &bfd_target_vector[0]; *target != NULL; target++)
|
||||||
*(name_ptr++) = (*target)->name;
|
if (target == &bfd_target_vector[0]
|
||||||
|
|| *target != bfd_target_vector[0])
|
||||||
|
*name_ptr++ = (*target)->name;
|
||||||
|
|
||||||
|
*name_ptr = NULL;
|
||||||
return name_list;
|
return name_list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user