]> xenbits.xensource.com Git - xen.git/commitdiff
libxl: fix file open failure check in libxl__file_reference_map
authorMatthew Daley <mattjd@gmail.com>
Wed, 18 Sep 2013 03:37:52 +0000 (15:37 +1200)
committerIan Campbell <ian.campbell@citrix.com>
Wed, 25 Sep 2013 11:56:08 +0000 (12:56 +0100)
Coverity-ID: 1055567
Signed-off-by: Matthew Daley <mattjd@gmail.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
tools/libxl/libxl_internal.c

index 5a8cd38bf922b85a7f39c3d58a840e0964772384..cf17658a7fbc52d59f09b0e199ccc78b165e07e0 100644 (file)
@@ -228,7 +228,7 @@ int libxl__file_reference_map(libxl__file_reference *f)
         return 0;
 
     fd = open(f->path, O_RDONLY);
-    if (f < 0)
+    if (fd < 0)
         return ERROR_FAIL;
 
     ret = fstat(fd, &st_buf);