Avoid declaration after instruction

Microsoft Visual C++ does not understand this C99 style.

Signed-off-by: Frank Li <lznuaa@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
Frank Li
2009-08-16 13:34:03 +08:00
committed by Johannes Schindelin
parent 7ea14c8f59
commit 3c150abb10
3 changed files with 16 additions and 5 deletions

View File

@@ -123,6 +123,7 @@ int start_command(struct child_process *cmd)
exit(127);
}
#else
{
int s0 = -1, s1 = -1, s2 = -1; /* backups of stdin, stdout, stderr */
const char **sargv = cmd->argv;
char **env = environ;
@@ -186,6 +187,7 @@ int start_command(struct child_process *cmd)
dup2(s1, 1), close(s1);
if (s2 >= 0)
dup2(s2, 2), close(s2);
}
#endif
if (cmd->pid < 0) {