config.c: drop hashmap_cmp_fn cast

Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Stefan Beller committed Jun 30, 2017 at 17:28 UTC 77bdc09786b731a9e2757a86d025e2859a5b333f
1 file changed +6 -4
config.c
+6 -4
@@ -1754,17 +1754,19 @@ static int configset_add_value(struct config_set *cs, const char *key, const cha
1754 }
1755
1756 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,
1759 const void *unused_keydata)
1760 {
1761 + const struct config_set_element *e1 = entry;
1762 + const struct config_set_element *e2 = entry_or_key;
1763 +
1764 return strcmp(e1->key, e2->key);
1765 }
1766
1767 void git_configset_init(struct config_set *cs)
1768 {
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);
1770 cs->hash_initialized = 1;
1771 cs->list.nr = 0;
1772 cs->list.alloc = 0;