From: Chunyan Liu <cyliu@suse.com>
To: xen-devel@lists.xen.org
Cc: Simon Cao <caobosimon@gmail.com>,
Ian Jackson <Ian.Jackson@eu.citrix.com>,
Chunyan Liu <cyliu@suse.com>,
George Dunlap <george.dunlap@citrix.com>
Subject: [PATCH 1/4] a fix in libxl_device_usbdev_list
Date: Thu, 7 Apr 2016 17:40:25 +0800 [thread overview]
Message-ID: <1460022028-25174-2-git-send-email-cyliu@suse.com> (raw)
In-Reply-To: <1460022028-25174-1-git-send-email-cyliu@suse.com>
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@suse.com>
CC: Simon Cao <caobosimon@gmail.com>
CC: George Dunlap <george.dunlap@citrix.com>
CC: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
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@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-04-07 9:40 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-07 9:40 [PATCH 0/4] pvusb fixes Chunyan Liu
2016-04-07 9:40 ` Chunyan Liu [this message]
2016-04-07 16:45 ` [PATCH 1/4] a fix in libxl_device_usbdev_list Ian Jackson
2016-04-08 3:47 ` Chun Yan Liu
2016-04-08 13:28 ` Ian Jackson
2016-04-08 13:30 ` Ian Jackson
2016-04-07 16:50 ` Ian Jackson
2016-04-07 9:40 ` [PATCH 2/4] correct libxl_write_exactly sizeof Chunyan Liu
2016-04-07 16:46 ` Ian Jackson
2016-04-07 9:40 ` [PATCH 3/4] cleanup redundant lstat in libxl_pvusb.c Chunyan Liu
2016-04-07 16:47 ` Ian Jackson
2016-04-07 9:40 ` [PATCH 4/4] fix a pvusb type check Chunyan Liu
2016-04-07 9:47 ` Juergen Gross
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1460022028-25174-2-git-send-email-cyliu@suse.com \
--to=cyliu@suse.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=caobosimon@gmail.com \
--cc=george.dunlap@citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).