]> git.ipfire.org Git - thirdparty/git.git/blobdiff - range-diff.c
Merge branch 'wb/fsmonitor-bitmap-fix'
[thirdparty/git.git] / range-diff.c
index f2fc1e02c2c74034c3fe1f3c29fcc81458ccb738..7fed5a3b4bb54a53f434cf23fb96151e9a8f824d 100644 (file)
@@ -218,8 +218,8 @@ static void find_exact_matches(struct string_list *a, struct string_list *b)
                util->i = i;
                util->patch = a->items[i].string;
                util->diff = util->patch + util->diff_offset;
-               hashmap_entry_init(util, strhash(util->diff));
-               hashmap_add(&map, util);
+               hashmap_entry_init(&util->e, strhash(util->diff));
+               hashmap_add(&map, &util->e);
        }
 
        /* Now try to find exact matches in b */
@@ -229,8 +229,8 @@ static void find_exact_matches(struct string_list *a, struct string_list *b)
                util->i = i;
                util->patch = b->items[i].string;
                util->diff = util->patch + util->diff_offset;
-               hashmap_entry_init(util, strhash(util->diff));
-               other = hashmap_remove(&map, util, NULL);
+               hashmap_entry_init(&util->e, strhash(util->diff));
+               other = hashmap_remove_entry(&map, util, e, NULL);
                if (other) {
                        if (other->matching >= 0)
                                BUG("already assigned!");
@@ -240,7 +240,7 @@ static void find_exact_matches(struct string_list *a, struct string_list *b)
                }
        }
 
-       hashmap_free(&map, 0);
+       hashmap_free(&map);
 }
 
 static void diffsize_consume(void *data, char *line, unsigned long len)