fix cl_git_mkfile() to test for -1 rather than 0 for errors from p_creat()

This commit is contained in:
Jeff Hostetler 2014-11-26 14:12:11 -05:00
parent 53e48b370c
commit 93aef71e90

View File

@ -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)));