]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/helper/test-hashmap.c
hashmap: introduce hashmap_free_entries
[thirdparty/git.git] / t / helper / test-hashmap.c
index 07a93a2aec243afe3bd2d4a3f09a899f4fc8a709..6f2530dcc8ce873651596cf078ca75e34af08a0a 100644 (file)
@@ -109,7 +109,7 @@ static void perf_hashmap(unsigned int method, unsigned int rounds)
                                hashmap_add(&map, &entries[i]->ent);
                        }
 
-                       hashmap_free(&map, 0);
+                       hashmap_free(&map);
                }
        } else {
                /* test map lookups */
@@ -129,7 +129,7 @@ static void perf_hashmap(unsigned int method, unsigned int rounds)
                        }
                }
 
-               hashmap_free(&map, 0);
+               hashmap_free(&map);
        }
 }
 
@@ -266,6 +266,6 @@ int cmd__hashmap(int argc, const char **argv)
        }
 
        strbuf_release(&line);
-       hashmap_free(&map, 1);
+       hashmap_free_entries(&map, struct test_entry, ent);
        return 0;
 }