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

[Xen-devel] [PATCH 02/11] libxl_pci: clean an unused return variable



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 <paulinaszubarczyk@xxxxxxxxx>

CC:     Wei Liu <wei.liu2@xxxxxxxxxx>
CC:     Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
CC: Dario Faggioli <dario.faggioli@xxxxxxxxxx>
CC: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
 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@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®.