diff options
author | Alan Modra <amodra@bigpond.net.au> | 2007-07-26 11:13:59 +0000 |
---|---|---|
committer | Alan Modra <amodra@bigpond.net.au> | 2007-07-26 11:13:59 +0000 |
commit | 820e488d729b201b7cc548c8f2277b363dc4e4b0 (patch) | |
tree | fd0ffdcb3d0040971cc1c93d16ae59d180ef319b /bfd/mmo.c | |
parent | b2ece17efaa6918b1996a46f4d5b1ccb670ba8c9 (diff) | |
download | binutils-redhat-820e488d729b201b7cc548c8f2277b363dc4e4b0.tar.gz |
* 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
@@ -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; |