summaryrefslogtreecommitdiff
path: root/remote.c
diff options
context:
space:
mode:
authorStefan Beller <sbeller@google.com>2017-06-30 17:28:35 -0700
committerJunio C Hamano <gitster@pobox.com>2017-07-05 13:53:12 -0700
commit45dcb35f9a4755f3530fe9ec6a1622deeefe36bf (patch)
tree04ed175c9945c9301eee56fa39a951466edb23e9 /remote.c
parent8d0017daa1dcd596a1412700aee378c27238319e (diff)
downloadgit-45dcb35f9a4755f3530fe9ec6a1622deeefe36bf.tar.gz
remote.c: drop hashmap_cmp_fn cast
Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'remote.c')
-rw-r--r--remote.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/remote.c b/remote.c
index 60d0043921..3efa358558 100644
--- a/remote.c
+++ b/remote.c
@@ -134,10 +134,14 @@ struct remotes_hash_key {
};
static int remotes_hash_cmp(const void *unused_cmp_data,
- const struct remote *a,
- const struct remote *b,
- const struct remotes_hash_key *key)
+ const void *entry,
+ const void *entry_or_key,
+ const void *keydata)
{
+ const struct remote *a = entry;
+ const struct remote *b = entry_or_key;
+ const struct remotes_hash_key *key = keydata;
+
if (key)
return strncmp(a->name, key->str, key->len) || a->name[key->len];
else
@@ -147,7 +151,7 @@ static int remotes_hash_cmp(const void *unused_cmp_data,
static inline void init_remotes_hash(void)
{
if (!remotes_hash.cmpfn)
- hashmap_init(&remotes_hash, (hashmap_cmp_fn)remotes_hash_cmp, NULL, 0);
+ hashmap_init(&remotes_hash, remotes_hash_cmp, NULL, 0);
}
static struct remote *make_remote(const char *name, int len)