Skip to content

Commit 45dcb35

Browse files
stefanbellergitster
authored andcommitted
remote.c: drop hashmap_cmp_fn cast
Signed-off-by: Stefan Beller <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 8d0017d commit 45dcb35

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

remote.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,14 @@ struct remotes_hash_key {
134134
};
135135

136136
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)
140140
{
141+
const struct remote *a = entry;
142+
const struct remote *b = entry_or_key;
143+
const struct remotes_hash_key *key = keydata;
144+
141145
if (key)
142146
return strncmp(a->name, key->str, key->len) || a->name[key->len];
143147
else
@@ -147,7 +151,7 @@ static int remotes_hash_cmp(const void *unused_cmp_data,
147151
static inline void init_remotes_hash(void)
148152
{
149153
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);
151155
}
152156

153157
static struct remote *make_remote(const char *name, int len)

0 commit comments

Comments
 (0)