Skip to content

Commit e57fa5f

Browse files
committed
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 <jfmcjf@gmail.com>
1 parent 10ca1f7 commit e57fa5f

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
@@ -896,7 +896,7 @@ int pipe(int filedes[2])
896896
return -1;
897897
}
898898
filedes[1] = _open_osfhandle(HCAST(int, h[1]), O_NOINHERIT);
899-
if (filedes[0] < 0) {
899+
if (filedes[1] < 0) {
900900
close(filedes[0]);
901901
CloseHandle(h[1]);
902902
return -1;

0 commit comments

Comments
 (0)