summaryrefslogtreecommitdiff
path: root/pack-revindex.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2016-10-03 13:30:33 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2016-10-03 13:30:33 -0700
commitb1f0a856605981363053941b8210f3cc9389607a (patch)
tree9de4bc7cc285925913c219edd4536985cc0cc256 /pack-revindex.c
parentSync with maint (diff)
parentuse COPY_ARRAY (diff)
downloadtgif-b1f0a856605981363053941b8210f3cc9389607a.tar.xz
Merge branch 'rs/copy-array'
Code cleanup. * rs/copy-array: use COPY_ARRAY add COPY_ARRAY
Diffstat (limited to 'pack-revindex.c')
-rw-r--r--pack-revindex.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pack-revindex.c b/pack-revindex.c
index 96d51c3467..6bc7c94033 100644
--- a/pack-revindex.c
+++ b/pack-revindex.c
@@ -107,7 +107,7 @@ static void sort_revindex(struct revindex_entry *entries, unsigned n, off_t max)
* we have to move it back from the temporary storage.
*/
if (from != entries)
- memcpy(entries, tmp, n * sizeof(*entries));
+ COPY_ARRAY(entries, tmp, n);
free(tmp);
free(pos);