This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


[Xen-devel] [PATCH]Fix wrong data type in xc_save.c

To: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH]Fix wrong data type in xc_save.c
From: Zhigang Wang <zhigang.x.wang@xxxxxxxxxx>
Date: Wed, 17 Sep 2008 20:53:18 +0800
Delivery-date: Wed, 17 Sep 2008 05:53:53 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird (Windows/20080708)
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.

Signed-off-by: Zhigang Wang <zhigang.x.wang@xxxxxxxxxx>
--- xen-unstable/tools/xcutils/xc_save.c        2008-09-10 01:02:42.000000000 
+++ xen-unstable.local/tools/xcutils/xc_save.c  2008-09-17 17:41:42.000000000 
@@ -297,8 +297,8 @@ static void *init_qemu_maps(int domid, u
 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
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH]Fix wrong data type in xc_save.c, Zhigang Wang <=