Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2024-01-09 01:05:16 +0300
committerJunio C Hamano <gitster@pobox.com>2024-01-09 01:05:16 +0300
commit8a48cd484f591758141d82fac124a0dddb57f5af (patch)
tree7d16b5df77c46501587def511ff709ad73cb94c5
parentd73db002b555d97d9ddf6ee517a8620db90281e9 (diff)
parent5b7eec4bc517311f9ceb2dc7abadcc47ddc6b015 (diff)
Merge branch 'rs/fast-import-simplify-mempool-allocation'
Code simplification. * rs/fast-import-simplify-mempool-allocation: fast-import: use mem_pool_calloc()
-rw-r--r--builtin/fast-import.c3
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;