util/hash_table: Properly handle the NULL key in hash_table_u64
authorCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Mon, 10 Jun 2019 19:10:54 +0000 (12:10 -0700)
committerCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Wed, 12 Jun 2019 22:57:16 +0000 (15:57 -0700)
commiteb41ce1b012f24fc7cba664dcc12129342e26843
treef4115acb7fb1da2c84d759bd2919ac2892cd4d0f
parentc129cb38613be79198ff57987d5b419f8b04973d
util/hash_table: Properly handle the NULL key in hash_table_u64

The hash_table_u64 should support any uint64_t as input.  It does
special handling for the "deleted" key, storing the data in the table
itself; do the same for the "freed" key.

Fixes: b38dab101ca "util/hash_table: Assert that keys are not reserved pointers"
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/util/hash_table.c
src/util/hash_table.h