libxl_device_pci_assignable_list returns: - list of the libxl_device_pci - NULL in case of error or lack of devices
the rc variable is unused as return code. Signed-off-by: Paulina Szubarczyk <paulinaszubarc...@gmail.com> CC: Wei Liu <wei.l...@citrix.com> CC: Ian Jackson <ian.jack...@eu.citrix.com> CC: Dario Faggioli <dario.faggi...@citrix.com> CC: Ian Campbell <ian.campb...@citrix.com> --- tools/libxl/libxl_pci.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tools/libxl/libxl_pci.c b/tools/libxl/libxl_pci.c index 3435ce2..6051ee4 100644 --- a/tools/libxl/libxl_pci.c +++ b/tools/libxl/libxl_pci.c @@ -397,12 +397,11 @@ libxl_device_pci *libxl_device_pci_assignable_list(libxl_ctx *ctx, int *num) libxl_device_pci *pcidevs = NULL, *new, *assigned; struct dirent *de; DIR *dir; - int rc, num_assigned; + int num_assigned; *num = 0; - rc = get_all_assigned_devices(gc, &assigned, &num_assigned); - if ( rc ) + if ( get_all_assigned_devices(gc, &assigned, &num_assigned) ) goto out; dir = opendir(SYSFS_PCIBACK_DRIVER); -- 1.9.1 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel