diff options
Diffstat (limited to 'src/gallium/auxiliary/util/u_debug_refcnt.c')
-rw-r--r-- | src/gallium/auxiliary/util/u_debug_refcnt.c | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/src/gallium/auxiliary/util/u_debug_refcnt.c b/src/gallium/auxiliary/util/u_debug_refcnt.c index ec95f87260c..c1560fb7dc0 100644 --- a/src/gallium/auxiliary/util/u_debug_refcnt.c +++ b/src/gallium/auxiliary/util/u_debug_refcnt.c @@ -58,25 +58,6 @@ static struct util_hash_table *serials_hash; static unsigned serials_last; -static unsigned -hash_ptr(void *p) -{ - return (unsigned) (uintptr_t) p; -} - - -static int -compare_ptr(void *a, void *b) -{ - if (a == b) - return 0; - else if (a < b) - return -1; - else - return 1; -} - - /** * Return a small integer serial number for the given pointer. */ @@ -96,7 +77,7 @@ debug_serial(void *p, unsigned *pserial) mtx_lock(&serials_mutex); if (!serials_hash) - serials_hash = util_hash_table_create(hash_ptr, compare_ptr); + serials_hash = util_hash_table_create_ptr_keys(); serial = (unsigned) (uintptr_t) util_hash_table_get(serials_hash, p); if (!serial) { |