t6050-replace: don't disable stdin for the whole test script
[gitweb.git] / parse-options.c
index 979577ba2c7a045ddd098f3bfb5cfb96706599d3..125e84f98451b4eb12e9d8a6cb4da58b2d8db51e 100644 (file)
@@ -571,7 +571,7 @@ int parse_options_step(struct parse_opt_ctx_t *ctx,
 
 int parse_options_end(struct parse_opt_ctx_t *ctx)
 {
-       memmove(ctx->out + ctx->cpidx, ctx->argv, ctx->argc * sizeof(*ctx->out));
+       MOVE_ARRAY(ctx->out + ctx->cpidx, ctx->argv, ctx->argc);
        ctx->out[ctx->cpidx + ctx->argc] = NULL;
        return ctx->cpidx + ctx->argc;
 }