summaryrefslogtreecommitdiff
path: root/fast-import.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2019-07-09 15:25:38 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2019-07-09 15:25:38 -0700
commite8d259064146f24abb1280aff0ca3ead20218244 (patch)
tree2a0f4b7ee4f9059928ea9619d14a42ddf4d0c163 /fast-import.c
parentMerge branch 'cb/fsmonitor-intfix' (diff)
parentuse COPY_ARRAY for copying arrays (diff)
downloadtgif-e8d259064146f24abb1280aff0ca3ead20218244.tar.xz
Merge branch 'rs/copy-array'
Code clean-up. * rs/copy-array: use COPY_ARRAY for copying arrays coccinelle: use COPY_ARRAY for copying arrays
Diffstat (limited to 'fast-import.c')
-rw-r--r--fast-import.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fast-import.c b/fast-import.c
index 76a7bd3699..6dfdd6801c 100644
--- a/fast-import.c
+++ b/fast-import.c
@@ -644,7 +644,7 @@ static struct tree_content *grow_tree_content(
struct tree_content *r = new_tree_content(t->entry_count + amt);
r->entry_count = t->entry_count;
r->delta_depth = t->delta_depth;
- memcpy(r->entries,t->entries,t->entry_count*sizeof(t->entries[0]));
+ COPY_ARRAY(r->entries, t->entries, t->entry_count);
release_tree_content(t);
return r;
}