Commit 93aef71e by Jeff Hostetler

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

parent 53e48b37
...@@ -18,7 +18,7 @@ void cl_git_mkfile(const char *filename, const char *content) ...@@ -18,7 +18,7 @@ void cl_git_mkfile(const char *filename, const char *content)
int fd; int fd;
fd = p_creat(filename, 0666); fd = p_creat(filename, 0666);
cl_assert(fd != 0); cl_assert(fd != -1);
if (content) { if (content) {
cl_must_pass(p_write(fd, content, strlen(content))); cl_must_pass(p_write(fd, content, strlen(content)));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment