submodule-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 152cbdc64e0c8d07adbd63f029f8fa5bb7c45ddf
1 file changed +12 -6
submodule-config.c
+12 -6
@@ -35,27 +35,33 @@ static struct submodule_cache the_submodule_cache;
35 static int is_cache_init;
36
37 static int config_path_cmp(const void *unused_cmp_data,
38 - const struct submodule_entry *a,
39 - const struct submodule_entry *b,
38 + const void *entry,
39 + const void *entry_or_key,
40 const void *unused_keydata)
41 {
42 + const struct submodule_entry *a = entry;
43 + const struct submodule_entry *b = entry_or_key;
44 +
45 return strcmp(a->config->path, b->config->path) ||
46 hashcmp(a->config->gitmodules_sha1, b->config->gitmodules_sha1);
47 }
48
49 static int config_name_cmp(const void *unused_cmp_data,
47 - const struct submodule_entry *a,
48 - const struct submodule_entry *b,
50 + const void *entry,
51 + const void *entry_or_key,
52 const void *unused_keydata)
53 {
54 + const struct submodule_entry *a = entry;
55 + const struct submodule_entry *b = entry_or_key;
56 +
57 return strcmp(a->config->name, b->config->name) ||
58 hashcmp(a->config->gitmodules_sha1, b->config->gitmodules_sha1);
59 }
60
61 static void cache_init(struct submodule_cache *cache)
62 {
57 - hashmap_init(&cache->for_path, (hashmap_cmp_fn) config_path_cmp, NULL, 0);
58 - hashmap_init(&cache->for_name, (hashmap_cmp_fn) config_name_cmp, NULL, 0);
63 + hashmap_init(&cache->for_path, config_path_cmp, NULL, 0);
64 + hashmap_init(&cache->for_name, config_name_cmp, NULL, 0);
65 }
66
67 static void free_one_config(struct submodule_entry *entry)