]> rtime.felk.cvut.cz Git - git.git/blobdiff - run-command.c
Avoid declaration after statement
[git.git] / run-command.c
index ac314a5a8d96d74a36dd2f274707204142e84b7b..02aaedfb8ca21d5fa706753937d5a1f7a7452038 100644 (file)
@@ -134,6 +134,7 @@ fail_pipe:
                error("cannot fork() for %s: %s", cmd->argv[0],
                        strerror(failed_errno = errno));
 #else
+{
        int s0 = -1, s1 = -1, s2 = -1;  /* backups of stdin, stdout, stderr */
        const char **sargv = cmd->argv;
        char **env = environ;
@@ -197,6 +198,7 @@ fail_pipe:
                dup2(s1, 1), close(s1);
        if (s2 >= 0)
                dup2(s2, 2), close(s2);
+}
 #endif
 
        if (cmd->pid < 0) {