--- gcc/objc/hash.c 2018/04/24 18:10:14 1.1.1.2 +++ gcc/objc/hash.c 2018/04/24 18:33:08 1.1.1.5 @@ -15,7 +15,8 @@ GNU General Public License for more deta You should have received a copy of the GNU General Public License along with GNU CC; see the file COPYING. If not, write to -the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ +the Free Software Foundation, 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ /* As a special exception, if you link this library with files compiled with GCC to produce an executable, this does not cause @@ -39,6 +40,8 @@ the Free Software Foundation, 675 Mass A #define EXPANSION(cache) \ ((cache)->size * 2) +void *__objc_xcalloc (size_t, size_t); + cache_ptr hash_new (unsigned int size, hash_func_type hash_func, compare_func_type compare_func) @@ -240,9 +243,10 @@ hash_value_for_key (cache_ptr cache, con if (node) do { - if ((*cache->compare_func)(node->key, key)) + if ((*cache->compare_func)(node->key, key)) { retval = node->value; - else + break; + } else node = node->next; } while (!retval && node);