Skip to content

Commit c3cb7b6

Browse files
jfmcgitster
authored andcommitted
Mingw: verify both ends of the pipe () call
The code to open and test the second end of the pipe clearly imitates the code for the first end. A little too closely, though... Let's fix the obvious copy-edit bug. Signed-off-by: Jose F. Morales <[email protected]> Signed-off-by: Johannes Schindelin <[email protected]> Reviewed-by: Jonathan Nieder <[email protected]> Acked-by: Johannes Sixt <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 52f6893 commit c3cb7b6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compat/mingw.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -681,7 +681,7 @@ int pipe(int filedes[2])
681681
return -1;
682682
}
683683
filedes[1] = _open_osfhandle((int)h[1], O_NOINHERIT);
684-
if (filedes[0] < 0) {
684+
if (filedes[1] < 0) {
685685
close(filedes[0]);
686686
CloseHandle(h[1]);
687687
return -1;

0 commit comments

Comments
 (0)