use 'tree-ish' instead of 'treeish'
[gitweb.git] / wrapper.c
index dd7ecbb115edd979f657e2e209126d364e6ccfac..6a015de5f0564e1ccc9c8cffca891f4ddf4a3ac3 100644 (file)
--- a/wrapper.c
+++ b/wrapper.c
@@ -322,7 +322,7 @@ int git_mkstemps_mode(char *pattern, int suffix_len, int mode)
                template[5] = letters[v % num_letters]; v /= num_letters;
 
                fd = open(pattern, O_CREAT | O_EXCL | O_RDWR, mode);
-               if (fd > 0)
+               if (fd >= 0)
                        return fd;
                /*
                 * Fatal error (EPERM, ENOSPC etc).