is zero. Correct return value on error.
* mmo.c (mmo_canonicalize_symtab): Likewise.
* binary.c (binary_canonicalize_symtab) Correct return on error.
+2007-07-26 Alan Modra <amodra@bigpond.net.au>
+
+ * srec.c (srec_canonicalize_symtab): Don't alloc when symcount
+ is zero. Correct return value on error.
+ * mmo.c (mmo_canonicalize_symtab): Likewise.
+ * binary.c (binary_canonicalize_symtab) Correct return on error.
+
2007-07-26 Thiemo Seufer <ths@mips.com>
* bfd.c (_bfd_set_gp_value): Use abort instead of BFD_FAIL.
syms = bfd_alloc (abfd, amt);
if (syms == NULL)
- return 0;
+ return -1;
/* Start symbol. */
syms[0].the_bfd = abfd;
unsigned int i;
csymbols = abfd->tdata.mmo_data->csymbols;
- if (csymbols == NULL)
+ if (csymbols == NULL && symcount != 0)
{
asymbol *c;
struct mmo_symbol *s;
mmo_sort_mmo_symbols);
csymbols = (asymbol *) bfd_alloc (abfd, symcount * sizeof (asymbol));
- if (csymbols == NULL && symcount != 0)
- return FALSE;
+ if (csymbols == NULL)
+ return -1;
abfd->tdata.mmo_data->csymbols = csymbols;
for (msp = (struct mmo_symbol **) alocation, c = csymbols;
unsigned int i;
csymbols = abfd->tdata.srec_data->csymbols;
- if (csymbols == NULL)
+ if (csymbols == NULL && symcount != 0)
{
asymbol *c;
struct srec_symbol *s;
csymbols = bfd_alloc (abfd, symcount * sizeof (asymbol));
- if (csymbols == NULL && symcount != 0)
- return 0;
+ if (csymbols == NULL)
+ return -1;
abfd->tdata.srec_data->csymbols = csymbols;
for (s = abfd->tdata.srec_data->symbols, c = csymbols;