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>
This commit is contained in:
René Scharfe
2019-06-15 20:36:35 +02:00
committed by Junio C Hamano
parent 177fbab747
commit 921d49be86
4 changed files with 7 additions and 7 deletions

View File

@@ -475,7 +475,7 @@ kwsprep (kwset_t kws)
for (i = 0; i < NCHAR; ++i)
kwset->next[i] = next[U(trans[i])];
else
memcpy(kwset->next, next, NCHAR * sizeof(struct trie *));
COPY_ARRAY(kwset->next, next, NCHAR);
}
/* Fix things up for any translation table. */