remote.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
45dcb35f9a4755f3530fe9ec6a1622deeefe36bf
1 file changed
+8
-4
remote.c
+8
-4
@@ -134,10 +134,14 @@ struct remotes_hash_key {
134
};
135
136
static int remotes_hash_cmp(const void *unused_cmp_data,
137
- const struct remote *a,
138
- const struct remote *b,
139
- const struct remotes_hash_key *key)
137
+ const void *entry,
138
+ const void *entry_or_key,
139
+ const void *keydata)
140
{
141
+ const struct remote *a = entry;
142
+ const struct remote *b = entry_or_key;
143
+ const struct remotes_hash_key *key = keydata;
144
+
145
if (key)
146
return strncmp(a->name, key->str, key->len) || a->name[key->len];
147
else
@@ -147,7 +151,7 @@ static int remotes_hash_cmp(const void *unused_cmp_data,
151
static inline void init_remotes_hash(void)
152
{
153
if (!remotes_hash.cmpfn)
150
- hashmap_init(&remotes_hash, (hashmap_cmp_fn)remotes_hash_cmp, NULL, 0);
154
+ hashmap_init(&remotes_hash, remotes_hash_cmp, NULL, 0);
155
}
156
157
static struct remote *make_remote(const char *name, int len)