]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin/fetch.c
hashmap_cmp_fn takes hashmap_entry params
[thirdparty/git.git] / builtin / fetch.c
index d06f2b98aae7b1da6d4d2fbb7221b3fc13a69312..476c2416e3b846d0f82b45e9da46c7deb85fe256 100644 (file)
@@ -258,13 +258,14 @@ struct refname_hash_entry {
 };
 
 static int refname_hash_entry_cmp(const void *hashmap_cmp_fn_data,
-                                 const void *e1_,
-                                 const void *e2_,
+                                 const struct hashmap_entry *eptr,
+                                 const struct hashmap_entry *entry_or_key,
                                  const void *keydata)
 {
-       const struct refname_hash_entry *e1 = e1_;
-       const struct refname_hash_entry *e2 = e2_;
+       const struct refname_hash_entry *e1, *e2;
 
+       e1 = container_of(eptr, const struct refname_hash_entry, ent);
+       e2 = container_of(entry_or_key, const struct refname_hash_entry, ent);
        return strcmp(e1->refname, keydata ? keydata : e2->refname);
 }