git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Mingw: verify both ends of the pipe () call
@ 2015-08-27 15:55 Johannes Schindelin
  2015-08-27 16:09 ` Johannes Schindelin
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Johannes Schindelin @ 2015-08-27 15:55 UTC (permalink / raw)
  To: git

From: jfmc <jfmcjf@gmail.com>

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>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
 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

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-08-28 18:14 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-27 15:55 [PATCH] Mingw: verify both ends of the pipe () call Johannes Schindelin
2015-08-27 16:09 ` Johannes Schindelin
2015-08-27 21:50 ` Jonathan Nieder
2015-08-28  8:07   ` Johannes Sixt
     [not found]   ` <CAEdsdLdEC7KCgYeu8zmPZWm8uORCwshQo2u9FYQKjrq-sV_bZg@mail.gmail.com>
2015-08-28  9:39     ` Johannes Schindelin
2015-08-28  9:44       ` Johannes Schindelin
2015-08-28  9:52   ` Johannes Schindelin
2015-08-28  9:43 ` [PATCH v2] " Johannes Schindelin
2015-08-28 18:14   ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).