Commit 11396085 by Richard Kenner

(hash_value_for_key): Prevent endless loop when 0 was stored in a

hashtable.

From-SVN: r11926
parent ff858cdf
/* Hash tables for Objective C internal structures
Copyright (C) 1993 Free Software Foundation, Inc.
Copyright (C) 1993, 1996 Free Software Foundation, Inc.
This file is part of GNU CC.
......@@ -243,9 +243,10 @@ hash_value_for_key (cache_ptr cache, const void *key)
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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment