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:
authorRené Scharfe <l.s.r@web.de>2019-06-15 21:36:35 +0300
committerJunio C Hamano <gitster@pobox.com>2019-06-18 04:15:04 +0300
commit921d49be86bd44ca290c8db6cc6f419dac3ed442 (patch)
tree73c8ec3613227772c56732a3d7da8e67e596e625 /fast-import.c
parent177fbab747da4f58cb2a8ce010b3515c86dd67c9 (diff)
use COPY_ARRAY for copying arrays
Convert calls of memcpy(3) to use COPY_ARRAY, which shortens and simplifies the code a bit. Patch generated by Coccinelle and contrib/coccinelle/array.cocci. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
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 f38d04fa58..606d44278d 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;
}