* PATCH] mingw: Fix a typo in the pipe() implementation.
@ 2014-10-09 8:03 Ralph Loader
0 siblings, 0 replies; only message in thread
From: Ralph Loader @ 2014-10-09 8:03 UTC (permalink / raw)
To: git; +Cc: Johannes Sixt
We checked the first file descriptor for errors twice, instead of
checking both file descriptors.
Signed-off-by: Ralph Loader <rcl@ihug.co.nz>
---
While this appears utterly trivial, I noticed this reading the code not
running it - I do not have the relevant OS to compile and test on.
compat/mingw.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/compat/mingw.c b/compat/mingw.c
index c5c37e5..7c92783 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;
--
2.1.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-10-09 8:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-09 8:03 PATCH] mingw: Fix a typo in the pipe() implementation Ralph Loader
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).