[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 1/4] a fix in libxl_device_usbdev_list



In testing with libvirt pvusb functionality, found a rc check
error in libxl_device_usbdev_list. Correct it. This function
is not used by xl.

Signed-off-by: Chunyan Liu <cyliu@xxxxxxxx>
CC: Simon Cao <caobosimon@xxxxxxxxx>
CC: George Dunlap <george.dunlap@xxxxxxxxxx>
CC: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
---
 tools/libxl/libxl_pvusb.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/libxl/libxl_pvusb.c b/tools/libxl/libxl_pvusb.c
index 5f92628..04e41b4 100644
--- a/tools/libxl/libxl_pvusb.c
+++ b/tools/libxl/libxl_pvusb.c
@@ -701,13 +701,13 @@ libxl_device_usbdev_list(libxl_ctx *ctx, uint32_t domid, 
int *num)
     usbctrls = libxl__xs_directory(gc, XBT_NULL, path, &nc);
 
     for (i = 0; i < nc; i++) {
-        int r, nd = 0;
+        int rc, nd = 0;
         libxl_device_usbdev *tmp = NULL;
 
-        r = libxl__device_usbdev_list_for_usbctrl(gc, domid,
+        rc = libxl__device_usbdev_list_for_usbctrl(gc, domid,
                                                   atoi(usbctrls[i]),
                                                   &tmp, &nd);
-        if (!r || !nd) continue;
+        if (rc || !nd) continue;
 
         usbdevs = libxl__realloc(NOGC, usbdevs,
                                  sizeof(*usbdevs) * (*num + nd));
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.