From 78255ba2cc00f41d96aa2911933764f59f24c958 Mon Sep 17 00:00:00 2001 From: "Emilio G. Cota" Date: Mon, 10 Sep 2018 13:06:12 -0400 Subject: qht: drop ht argument from qht iterators MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Emilio G. Cota Signed-off-by: Richard Henderson --- tests/test-qht.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests') 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; -- cgit v1.2.3