зеркало из https://github.com/microsoft/git.git
remote.c: drop hashmap_cmp_fn cast
Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Родитель
8d0017daa1
Коммит
45dcb35f9a
12
remote.c
12
remote.c
|
@ -134,10 +134,14 @@ struct remotes_hash_key {
|
||||||
};
|
};
|
||||||
|
|
||||||
static int remotes_hash_cmp(const void *unused_cmp_data,
|
static int remotes_hash_cmp(const void *unused_cmp_data,
|
||||||
const struct remote *a,
|
const void *entry,
|
||||||
const struct remote *b,
|
const void *entry_or_key,
|
||||||
const struct remotes_hash_key *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)
|
if (key)
|
||||||
return strncmp(a->name, key->str, key->len) || a->name[key->len];
|
return strncmp(a->name, key->str, key->len) || a->name[key->len];
|
||||||
else
|
else
|
||||||
|
@ -147,7 +151,7 @@ static int remotes_hash_cmp(const void *unused_cmp_data,
|
||||||
static inline void init_remotes_hash(void)
|
static inline void init_remotes_hash(void)
|
||||||
{
|
{
|
||||||
if (!remotes_hash.cmpfn)
|
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)
|
static struct remote *make_remote(const char *name, int len)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче