]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin/fast-export.c
hashmap_get{,_from_hash} return "struct hashmap_entry *"
[thirdparty/git.git] / builtin / fast-export.c
index f541f55d333b7a29fcdca88919dc316a1fe0b931..25195badd4341bfe311c62550c73324e12c21df6 100644 (file)
@@ -148,10 +148,10 @@ static const void *anonymize_mem(struct hashmap *map,
        if (!map->cmpfn)
                hashmap_init(map, anonymized_entry_cmp, NULL, 0);
 
-       hashmap_entry_init(&key, memhash(orig, *len));
+       hashmap_entry_init(&key.hash, memhash(orig, *len));
        key.orig = orig;
        key.orig_len = *len;
-       ret = hashmap_get(map, &key, NULL);
+       ret = hashmap_get_entry(map, &key, NULL, struct anonymized_entry, hash);
 
        if (!ret) {
                ret = xmalloc(sizeof(*ret));
@@ -160,7 +160,7 @@ static const void *anonymize_mem(struct hashmap *map,
                ret->orig_len = *len;
                ret->anon = generate(orig, len);
                ret->anon_len = *len;
-               hashmap_put(map, ret);
+               hashmap_put(map, &ret->hash);
        }
 
        *len = ret->anon_len;