dup and open error value is -1, not < 0

Signed-off-by: Vincent Hanquez <vincent@xensource.com>
This commit is contained in:
vhanquez@kneesa.uk.xensource.com committed 2006-01-24 10:37:44 +00:00
1 parent 05e845bded
commit 6ab3d2a421
1 file changed
+1 -1
+1 -1
View File
@@ -92,7 +92,7 @@ void *grab_file(const char *filename, unsigned long *size)
else
fd = open(filename, O_RDONLY, 0);
if (fd < 0)
if (fd == -1)
return NULL;
buffer = malloc(max+1);
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.