summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJason Ekstrand <jason.ekstrand@intel.com>2016-03-02 14:05:40 -0800
committerEric Anholt <eric@anholt.net>2016-03-02 14:31:03 -0800
commiteee99a505ea5f9d2b562fdec14d3b919558ecea4 (patch)
tree505d3744deab3c851de9889d7cfa129b173d995f /tests
parent994f9aa45d5b9ca713efc2a863d7de5fa6c8020e (diff)
Do a full search when adding new items
Previously, the hash_table_insert or set_add functions would bail early if it found a deleted slot that it could re-use. However, this is a problem if the key being inserted is already in the hash table but further down the list. If this happens, the element ends up getting inserted in the hash table twice. This commit makes it so that we walk over all of the possible entries for the given key and then, if we don't find the key, place it in the available free entry we found. v2: Fold in Connor Abbot's fix to not check keys in deleted entries. v3: Propagate this change to int-set, too (change by anholt). Reviewed-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions