const void *key, uint32_t keysize, void **valuep) {
REQUIRE(ISC_HASHMAP_VALID(hashmap));
REQUIRE(key != NULL && keysize <= UINT16_MAX);
+ REQUIRE(valuep == NULL || *valuep == NULL);
- hashmap_node_t *node;
+ hashmap_node_t *node = NULL;
uint8_t idx = hashmap->hindex;
uint32_t hashval = (hashvalp != NULL)
? *hashvalp
test_node_t lower = { .key = "isc_hashmap_case" };
test_node_t upper = { .key = "ISC_HASHMAP_CASE" };
test_node_t mixed = { .key = "IsC_hAsHmAp_CaSe" };
- test_node_t *value;
isc_hashmap_create(mctx, 1, ISC_HASHMAP_CASE_SENSITIVE, &hashmap);
assert_int_equal(result, ISC_R_SUCCESS);
result = isc_hashmap_find(hashmap, NULL, mixed.key, strlen(mixed.key),
- (void *)&value);
+ &(void *){ NULL });
assert_int_equal(result, ISC_R_NOTFOUND);
isc_hashmap_destroy(&hashmap);
assert_int_equal(result, ISC_R_EXISTS);
result = isc_hashmap_find(hashmap, NULL, mixed.key, strlen(mixed.key),
- (void *)&value);
+ &(void *){ NULL });
assert_int_equal(result, ISC_R_SUCCESS);
isc_hashmap_destroy(&hashmap);