diff options
author | Junio C Hamano <gitster@pobox.com> | 2024-02-08 16:22:10 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-02-08 16:22:11 -0800 |
commit | 232953b904c63fef02484d3505ead0496978d411 (patch) | |
tree | fb1cf3071b707553800749da04af4e2ec3eff527 | |
parent | 0f7a10a3aad344a28f0f30b32a979925a9629533 (diff) | |
parent | 5b7eec4bc517311f9ceb2dc7abadcc47ddc6b015 (diff) | |
download | git-232953b904c63fef02484d3505ead0496978d411.tar.gz |
Merge branch 'rs/fast-import-simplify-mempool-allocation' into maint-2.43
Code simplification.
* rs/fast-import-simplify-mempool-allocation:
fast-import: use mem_pool_calloc()
-rw-r--r-- | builtin/fast-import.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/builtin/fast-import.c b/builtin/fast-import.c index 444f41cf8c..92eda20683 100644 --- a/builtin/fast-import.c +++ b/builtin/fast-import.c @@ -2809,8 +2809,7 @@ static void parse_new_tag(const char *arg) enum object_type type; const char *v; - t = mem_pool_alloc(&fi_mem_pool, sizeof(struct tag)); - memset(t, 0, sizeof(struct tag)); + t = mem_pool_calloc(&fi_mem_pool, 1, sizeof(struct tag)); t->name = mem_pool_strdup(&fi_mem_pool, arg); if (last_tag) last_tag->next_tag = t; |