From 9a45fd6f33d2836c6452d46fde43ec83056fd6aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Fri, 6 Oct 2023 10:28:32 +0200 Subject: [PATCH] Fix hashmap part of load-names benchmark The name_match() was errorneously converting struct item into dns_name pointer. Correctly retype void *node to struct item * first and then use item.fixed.name to pass the name to dns_name_equal() function. --- tests/bench/load-names.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/bench/load-names.c b/tests/bench/load-names.c index 752d7e8b58..0e5512e69b 100644 --- a/tests/bench/load-names.c +++ b/tests/bench/load-names.c @@ -190,7 +190,8 @@ new_hashmap(isc_mem_t *mem) { static bool name_match(void *node, const void *key) { - return (dns_name_equal(node, key)); + const struct item_s *i = node; + return (dns_name_equal(&i->fixed.name, key)); } static isc_result_t