git_mkstemps: correctly test return value of open()
commita2cb86c1524b7af20e609ca8d3db0b60b5c1d575
authorDale R. Worley <worley@alum.mit.edu>
Fri, 12 Jul 2013 08:58:35 +0000 (12 10:58 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 12 Jul 2013 17:30:08 +0000 (12 10:30 -0700)
treeca904b3742a076666a6dc1f726aa159368f57a35
parent62e91efafd2030b7dc33ac6450b4e9a316e6ecc6
git_mkstemps: correctly test return value of open()

open() returns -1 on failure, and indeed 0 is a possible success value
if the user closed stdin in our process.  Fix the test.

Signed-off-by: Thomas Rast <trast@inf.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
wrapper.c