From: Ondřej Surý Date: Fri, 6 Oct 2023 08:28:32 +0000 (+0200) Subject: Fix hashmap part of load-names benchmark X-Git-Tag: v9.19.18~51^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9a45fd6f33d2836c6452d46fde43ec83056fd6aa;p=thirdparty%2Fbind9.git 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. --- diff --git a/tests/bench/load-names.c b/tests/bench/load-names.c index 752d7e8b58b..0e5512e69b5 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