mingw: use COPY_ARRAY for copying array
commit51bd6be32dfcb638727d89816a69ef13717ab17c
authorRené Scharfe <l.s.r@web.de>
Tue, 12 Nov 2019 21:41:14 +0000 (12 22:41 +0100)
committerJunio C Hamano <gitster@pobox.com>
Wed, 13 Nov 2019 02:29:22 +0000 (13 11:29 +0900)
treef8a499f53044a3a6f73fc422f6b2cc9af1454a87
parent5fa0f5238b0cd46cfe7f6fa76c3f526ea98148d9
mingw: use COPY_ARRAY for copying array

Use the macro COPY_ARRAY to copy array elements.  The result is shorter
and safer, as it infers the element type automatically and does a (very)
basic type compatibility check for its first two arguments.

Coccinelle and contrib/coccinelle/array.cocci did not generate this
conversion due to the offset of 1 at both source and destination and
because the source is a const pointer; the semantic patch cautiously
handles only pure pointers and array references of the same type.

Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
compat/mingw.c