aboutsummaryrefslogtreecommitdiff
path: root/compat
diff options
context:
space:
mode:
authorJose F. Morales <jfmcjf@gmail.com>2015-08-28 09:43:37 +0000
committerJunio C Hamano <gitster@pobox.com>2015-08-28 11:11:50 -0700
commitc3cb7b6fecd4fe00b002e5a90a7a91f148c50248 (patch)
tree4c71614c6ce720981f0b3e2602b347f7b70cbb4d /compat
parent52f6893d356fd04ba350e5b7dd468b2181844521 (diff)
downloadgit-c3cb7b6fecd4fe00b002e5a90a7a91f148c50248.tar.gz
git-c3cb7b6fecd4fe00b002e5a90a7a91f148c50248.tar.xz
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 <jfmcjf@gmail.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Acked-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'compat')
-rw-r--r--compat/mingw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/compat/mingw.c b/compat/mingw.c
index 496e6f8bb..f74da235f 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;