diff options
Diffstat (limited to 'Source/cmWin32ProcessExecution.cxx')
-rw-r--r-- | Source/cmWin32ProcessExecution.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Source/cmWin32ProcessExecution.cxx b/Source/cmWin32ProcessExecution.cxx index 88b0127..ed7b1ea 100644 --- a/Source/cmWin32ProcessExecution.cxx +++ b/Source/cmWin32ProcessExecution.cxx @@ -293,14 +293,14 @@ static BOOL RealPopenCreateProcess(const char *cmdstring, PROCESS_INFORMATION piProcInfo; STARTUPINFO siStartInfo; char *s1=0,*s2=0, *s3 = " /c "; - int i; - int x; - if (i = GetEnvironmentVariable("COMSPEC",NULL,0)) + int i = GetEnvironmentVariable("COMSPEC",NULL,0); + if (i) { char *comshell; s1 = (char *)malloc(i); - if (!(x = GetEnvironmentVariable("COMSPEC", s1, i))) + int x = GetEnvironmentVariable("COMSPEC", s1, i); + if (!x) { free(s1); return x; @@ -607,7 +607,7 @@ bool cmWin32ProcessExecution::PrivateOpen(const char *cmdstring, case POPEN_2: case POPEN_4: - if ( 1 ) + //if ( 1 ) { fd1 = _open_osfhandle(TO_INTPTR(this->hChildStdinWrDup), mode); fd2 = _open_osfhandle(TO_INTPTR(this->hChildStdoutRdDup), mode); @@ -615,7 +615,7 @@ bool cmWin32ProcessExecution::PrivateOpen(const char *cmdstring, } case POPEN_3: - if ( 1) + //if ( 1) { fd1 = _open_osfhandle(TO_INTPTR(this->hChildStdinWrDup), mode); fd2 = _open_osfhandle(TO_INTPTR(this->hChildStdoutRdDup), mode); |