Commit 169497d1e7c238d2925577d1af3dc03e9a507cd3

Edward Thomson 2014-12-01T10:43:11

Merge pull request #2734 from jeffhostetler/jeffhostetler/git_mkfile fix cl_git_mkfile() to test for -1 rather than 0 for errors from p_creat...

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/tests/clar_libgit2.c b/tests/clar_libgit2.c
index faeee03..9640b92 100644
--- a/tests/clar_libgit2.c
+++ b/tests/clar_libgit2.c
@@ -18,7 +18,7 @@ void cl_git_mkfile(const char *filename, const char *content)
 	int fd;
 
 	fd = p_creat(filename, 0666);
-	cl_assert(fd != 0);
+	cl_assert(fd != -1);
 
 	if (content) {
 		cl_must_pass(p_write(fd, content, strlen(content)));