diff options
author | Alan Modra <amodra@gmail.com> | 2007-07-26 11:13:59 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2007-07-26 11:13:59 +0000 |
commit | b9da616afe44eb7d00a669dad47bc6860e9b23d3 (patch) | |
tree | c277c948f1400b1d03e3eb1f4e3280d938a1bed4 /bfd/mmo.c | |
parent | * bfd.c (_bfd_set_gp_value): Use abort instead of BFD_FAIL. (diff) | |
download | binutils-gdb-b9da616afe44eb7d00a669dad47bc6860e9b23d3.tar.gz binutils-gdb-b9da616afe44eb7d00a669dad47bc6860e9b23d3.tar.bz2 binutils-gdb-b9da616afe44eb7d00a669dad47bc6860e9b23d3.zip |
* 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.
Diffstat (limited to 'bfd/mmo.c')
-rw-r--r-- | bfd/mmo.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bfd/mmo.c b/bfd/mmo.c index 0d3e9633e73..c0e8082826f 100644 --- a/bfd/mmo.c +++ b/bfd/mmo.c @@ -2097,7 +2097,7 @@ mmo_canonicalize_symtab (bfd *abfd, asymbol **alocation) unsigned int i; csymbols = abfd->tdata.mmo_data->csymbols; - if (csymbols == NULL) + if (csymbols == NULL && symcount != 0) { asymbol *c; struct mmo_symbol *s; @@ -2119,8 +2119,8 @@ mmo_canonicalize_symtab (bfd *abfd, asymbol **alocation) 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; |