Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH v2] Mingw: verify both ends of the pipe () call

From: Junio C Hamano <hidden>
Date: 2016-06-15 23:06:20

Johannes Schindelin [off-list ref] writes:
quoted hunk
From: Jose F. Morales <redacted>

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 <redacted>
Signed-off-by: Johannes Schindelin <redacted>
---
 compat/mingw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/compat/mingw.c b/compat/mingw.c
index 496e6f8..f74da23 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;

--
https://github.com/git/git/pull/168
Thanks all.  Will queue directly on 'maint' with reviewed-by's and
acked-by's.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help