diff options
author | vhanquez@kneesa.uk.xensource.com <vhanquez@kneesa.uk.xensource.com> | 2006-01-24 10:37:44 +0000 |
---|---|---|
committer | vhanquez@kneesa.uk.xensource.com <vhanquez@kneesa.uk.xensource.com> | 2006-01-24 10:37:44 +0000 |
commit | 6ab3d2a42109645b5b3fccc8838afa0fcf9ff4dd (patch) | |
tree | fa4135b4b37a73ff443c96eceaf673d76784aec0 /tools/xenstore/utils.c | |
parent | 05e845bdedb8c22bda0ad097b39eb5a3b6f5b078 (diff) | |
download | xen-6ab3d2a42109645b5b3fccc8838afa0fcf9ff4dd.tar.gz xen-6ab3d2a42109645b5b3fccc8838afa0fcf9ff4dd.tar.bz2 xen-6ab3d2a42109645b5b3fccc8838afa0fcf9ff4dd.zip |
dup and open error value is -1, not < 0
Signed-off-by: Vincent Hanquez <vincent@xensource.com>
Diffstat (limited to 'tools/xenstore/utils.c')
-rw-r--r-- | tools/xenstore/utils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/xenstore/utils.c b/tools/xenstore/utils.c index 2bc40e009b..1bf8606b40 100644 --- a/tools/xenstore/utils.c +++ b/tools/xenstore/utils.c @@ -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); |