summaryrefslogtreecommitdiff
path: root/compat/mingw.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-12-01 17:04:39 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-12-01 17:04:39 (GMT)
commit9da394878174b1197844f90a2f085443e72203cb (patch)
tree9b74abc20dc3d8da4764ad290a56583ccc4da3c3 /compat/mingw.c
parent406ca29e0d660f8ba99a783cb207c53359f870cc (diff)
parent51bd6be32dfcb638727d89816a69ef13717ab17c (diff)
downloadgit-9da394878174b1197844f90a2f085443e72203cb.zip
git-9da394878174b1197844f90a2f085443e72203cb.tar.gz
git-9da394878174b1197844f90a2f085443e72203cb.tar.bz2
Merge branch 'rs/use-copy-array-in-mingw-shell-command-preparation'
Code cleanup. * rs/use-copy-array-in-mingw-shell-command-preparation: mingw: use COPY_ARRAY for copying array
Diffstat (limited to 'compat/mingw.c')
-rw-r--r--compat/mingw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/compat/mingw.c b/compat/mingw.c
index fe60923..2f4654c 100644
--- a/compat/mingw.c
+++ b/compat/mingw.c
@@ -1566,7 +1566,7 @@ static int try_shell_exec(const char *cmd, char *const *argv)
while (argv[argc]) argc++;
ALLOC_ARRAY(argv2, argc + 1);
argv2[0] = (char *)cmd; /* full path to the script file */
- memcpy(&argv2[1], &argv[1], sizeof(*argv) * argc);
+ COPY_ARRAY(&argv2[1], &argv[1], argc);
exec_id = trace2_exec(prog, argv2);
pid = mingw_spawnv(prog, argv2, 1);
if (pid >= 0) {