mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
dup and open error value is -1, not < 0
Signed-off-by: Vincent Hanquez <vincent@xensource.com>
This commit is contained in:
1 parent
05e845bded
commit
6ab3d2a421
1 file changed
+1
-1
@@ -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);
|
||||
|
||||