From 87b3278031d935fffc282bd376ce6303d926b0e0 Mon Sep 17 00:00:00 2001 From: Michael Snyder Date: Fri, 27 Jul 2007 19:04:39 +0000 Subject: 2007-07-27 Michael Snyder * aoutx.h (slurp_symbol_table): Return if count == 0. --- bfd/aoutx.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'bfd/aoutx.h') diff --git a/bfd/aoutx.h b/bfd/aoutx.h index e07d7be..af7d45b 100644 --- a/bfd/aoutx.h +++ b/bfd/aoutx.h @@ -1739,9 +1739,12 @@ NAME (aout, slurp_symbol_table) (bfd *abfd) return FALSE; cached_size = obj_aout_external_sym_count (abfd); + if (cached_size == 0) + return TRUE; /* Nothing to do. */ + cached_size *= sizeof (aout_symbol_type); cached = bfd_zmalloc (cached_size); - if (cached == NULL && cached_size != 0) + if (cached == NULL) return FALSE; /* Convert from external symbol information to internal. */ -- cgit v1.1