summaryrefslogtreecommitdiff
path: root/bfd/aoutx.h
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2007-08-09 23:14:55 +0000
committerMichael Snyder <msnyder@vmware.com>2007-08-09 23:14:55 +0000
commitb9b4fcb40593ba2bfbafe3e7da0285883e3f1e38 (patch)
tree9601053c3de47a41bc2883e198df245518f7b4af /bfd/aoutx.h
parent4129d16eb27b2cb307bff319104d5b200904bf85 (diff)
downloadbinutils-redhat-b9b4fcb40593ba2bfbafe3e7da0285883e3f1e38.tar.gz
2007-08-09 Michael Snyder <msnyder@access-company.com>
* aoutx.h (aout_get_external_symbols): Return if count is zero.
Diffstat (limited to 'bfd/aoutx.h')
-rw-r--r--bfd/aoutx.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/bfd/aoutx.h b/bfd/aoutx.h
index 1244510981..b469b77c62 100644
--- a/bfd/aoutx.h
+++ b/bfd/aoutx.h
@@ -1294,6 +1294,8 @@ aout_get_external_symbols (bfd *abfd)
bfd_size_type amt;
count = exec_hdr (abfd)->a_syms / EXTERNAL_NLIST_SIZE;
+ if (count == 0)
+ return TRUE; /* Nothing to do. */
#ifdef USE_MMAP
if (! bfd_get_file_window (abfd, obj_sym_filepos (abfd),
@@ -1306,7 +1308,7 @@ aout_get_external_symbols (bfd *abfd)
later on. If we put them on the objalloc it might not be
possible to free them. */
syms = bfd_malloc (count * EXTERNAL_NLIST_SIZE);
- if (syms == NULL && count != 0)
+ if (syms == NULL)
return FALSE;
amt = exec_hdr (abfd)->a_syms;