Merge branch 'en/filter-branch-deprecation'
[gitweb.git] / compat / mingw.c
index a417a3b1ae09397ec702f8b56d13655c2c75a6d3..7a0d619fb6b59641191d819d2c43d4ced8b93df2 100644 (file)
@@ -1272,7 +1272,7 @@ static wchar_t *make_environment_block(char **deltaenv)
                }
 
                ALLOC_ARRAY(result, size);
-               memcpy(result, wenv, size * sizeof(*wenv));
+               COPY_ARRAY(result, wenv, size);
                FreeEnvironmentStringsW(wenv);
                return result;
        }
@@ -1316,7 +1316,7 @@ static wchar_t *make_environment_block(char **deltaenv)
                        continue;
 
                size = wcslen(array[i]) + 1;
-               memcpy(p, array[i], size * sizeof(*p));
+               COPY_ARRAY(p, array[i], size);
                p += size;
        }
        *p = L'\0';