Skip to contentSkip to conversation

Fix wrong data type in xc_save.c

PATCH New Zhigang Wang 1 participant 1 message Sep 17, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix wrong data type in xc_save.c

Fix wrong data type in xc_save.c. xc_interface_open() may return -1, if we define xc_fd as unsigned int, then -1 will be > 0.

tools/xcutils/xc_save.c +2 -2
@@ -297,8 +297,8 @@ static void *init_qemu_maps(int domid, u
 int
 main(int argc, char **argv)
 {
-    unsigned int xc_fd, io_fd, domid, maxit, max_f, flags; 
-    int ret;
+    unsigned int domid, maxit, max_f, flags; 
+    int xc_fd, io_fd, ret;
 
     if (argc != 6)
         errx(1, "usage: %s iofd domid maxit maxf flags", argv[0]);

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel