diff options
author | Emilio G. Cota <cota@braap.org> | 2018-09-10 13:06:12 -0400 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2018-09-26 08:55:54 -0700 |
commit | 78255ba2cc00f41d96aa2911933764f59f24c958 (patch) | |
tree | 06b33056d900b7cdc79ac7d8540461c6768a4c15 /tests | |
parent | ca8897a44cda60693e66085f1e916e76b94400df (diff) |
qht: drop ht argument from qht iterators
Accessing the HT from an iterator results almost always
in a deadlock. Given that only one qht-internal function
uses this argument, drop it from the interface.
Suggested-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Emilio G. Cota <cota@braap.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test-qht.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test-qht.c b/tests/test-qht.c index 1ec039d636..4d23cefab6 100644 --- a/tests/test-qht.c +++ b/tests/test-qht.c @@ -98,7 +98,7 @@ static void check(int a, int b, bool expected) qht_statistics_destroy(&stats); } -static void count_func(struct qht *ht, void *p, uint32_t hash, void *userp) +static void count_func(void *p, uint32_t hash, void *userp) { unsigned int *curr = userp; @@ -122,7 +122,7 @@ static void iter_check(unsigned int count) g_assert_cmpuint(curr, ==, count); } -static void sum_func(struct qht *ht, void *p, uint32_t hash, void *userp) +static void sum_func(void *p, uint32_t hash, void *userp) { uint32_t *sum = userp; uint32_t a = *(uint32_t *)p; @@ -138,7 +138,7 @@ static void iter_sum_check(unsigned int expected) g_assert_cmpuint(sum, ==, expected); } -static bool rm_mod_func(struct qht *ht, void *p, uint32_t hash, void *userp) +static bool rm_mod_func(void *p, uint32_t hash, void *userp) { uint32_t a = *(uint32_t *)p; unsigned int mod = *(unsigned int *)userp; |