]> git.ipfire.org Git - thirdparty/git.git/blobdiff - remote.c
hashmap_cmp_fn takes hashmap_entry params
[thirdparty/git.git] / remote.c
index ed95ae6ed6697f64c16c6ca27cf938e9bb943d1b..fa9cadcfbd1844002b4e77af417d61c5844f8a4f 100644 (file)
--- a/remote.c
+++ b/remote.c
@@ -111,14 +111,16 @@ struct remotes_hash_key {
 };
 
 static int remotes_hash_cmp(const void *unused_cmp_data,
-                           const void *entry,
-                           const void *entry_or_key,
+                           const struct hashmap_entry *eptr,
+                           const struct hashmap_entry *entry_or_key,
                            const void *keydata)
 {
-       const struct remote *a = entry;
-       const struct remote *b = entry_or_key;
+       const struct remote *a, *b;
        const struct remotes_hash_key *key = keydata;
 
+       a = container_of(eptr, const struct remote, ent);
+       b = container_of(entry_or_key, const struct remote, ent);
+
        if (key)
                return strncmp(a->name, key->str, key->len) || a->name[key->len];
        else