{"thread":{"id":"37696","subject":"PATCH] mingw: Fix a typo in the pipe() implementation.","startedAt":"2014-10-09T08:03:59Z","lastAt":"2014-10-09T08:03:59Z","messageCount":1,"participants":["Ralph Loader"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"250418","messageId":"20141009210359.57a0bdab1f8f8700dc206e76@ihug.co.nz","threadId":"37696","inReplyTo":null,"subject":"PATCH] mingw: Fix a typo in the pipe() implementation.","fromName":"Ralph Loader","fromEmail":"suckfish@ihug.co.nz","sentAt":"2014-10-09T08:03:59Z","receivedAt":"2014-10-09T08:03:59Z","isPatch":false,"sender":{"key":"suckfish@ihug.co.nz","avatar":null},"body":"We checked the first file descriptor for errors twice, instead of\nchecking both file descriptors.\n\nSigned-off-by: Ralph Loader <rcl@ihug.co.nz>\n---\nWhile this appears utterly trivial, I noticed this reading the code not\nrunning it - I do not have the relevant OS to compile and test on.\n\n compat/mingw.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/compat/mingw.c b/compat/mingw.c\nindex c5c37e5..7c92783 100644\n--- a/compat/mingw.c\n+++ b/compat/mingw.c\n@@ -681,7 +681,7 @@ int pipe(int filedes[2])\n \t\treturn -1;\n \t}\n \tfiledes[1] = _open_osfhandle((int)h[1], O_NOINHERIT);\n-\tif (filedes[0] < 0) {\n+\tif (filedes[1] < 0) {\n \t\tclose(filedes[0]);\n \t\tCloseHandle(h[1]);\n \t\treturn -1;\n-- \n2.1.0\n"}]}