Skip to content

Commit 77bdc09

Browse files
stefanbellergitster
authored andcommitted
config.c: drop hashmap_cmp_fn cast
Signed-off-by: Stefan Beller <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 0068ced commit 77bdc09

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

config.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1754,17 +1754,19 @@ static int configset_add_value(struct config_set *cs, const char *key, const cha
17541754
}
17551755

17561756
static int config_set_element_cmp(const void *unused_cmp_data,
1757-
const struct config_set_element *e1,
1758-
const struct config_set_element *e2,
1757+
const void *entry,
1758+
const void *entry_or_key,
17591759
const void *unused_keydata)
17601760
{
1761+
const struct config_set_element *e1 = entry;
1762+
const struct config_set_element *e2 = entry_or_key;
1763+
17611764
return strcmp(e1->key, e2->key);
17621765
}
17631766

17641767
void git_configset_init(struct config_set *cs)
17651768
{
1766-
hashmap_init(&cs->config_hash, (hashmap_cmp_fn)config_set_element_cmp,
1767-
NULL, 0);
1769+
hashmap_init(&cs->config_hash, config_set_element_cmp, NULL, 0);
17681770
cs->hash_initialized = 1;
17691771
cs->list.nr = 0;
17701772
cs->list.alloc = 0;

0 commit comments

Comments
 (0)