From: Jose F. Morales Date: Fri, 28 Aug 2015 09:43:37 +0000 (+0000) Subject: Mingw: verify both ends of the pipe () call X-Git-Tag: v2.5.1~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c3cb7b6fecd4fe00b002e5a90a7a91f148c50248;p=thirdparty%2Fgit.git 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 Signed-off-by: Johannes Schindelin Reviewed-by: Jonathan Nieder Acked-by: Johannes Sixt Signed-off-by: Junio C Hamano --- diff --git a/compat/mingw.c b/compat/mingw.c index 496e6f8bb0..f74da235f5 100644 --- a/compat/mingw.c +++ b/compat/mingw.c @@ -681,7 +681,7 @@ int pipe(int filedes[2]) return -1; } filedes[1] = _open_osfhandle((int)h[1], O_NOINHERIT); - if (filedes[0] < 0) { + if (filedes[1] < 0) { close(filedes[0]); CloseHandle(h[1]); return -1;