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

[libvirt] [PATCH 39/50] virsh: Fix a bug of nodedev-list



Output of commands like '%virsh nodedev-list --tree --cap pci'
could be empty. Remove the useless checking.
---
 tools/virsh.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/tools/virsh.c b/tools/virsh.c
index 0d56934..1494620 100644
--- a/tools/virsh.c
+++ b/tools/virsh.c
@@ -14238,9 +14238,8 @@ cmdNodeListDevices(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
             virNodeDeviceFree(dev);
         }
         for (i = 0 ; i < num_devices ; i++) {
-            if (parents[i] == NULL &&
-                vshTreePrint(ctl, vshNodeListLookup, &arrays, num_devices,
-                             i) < 0)
+            if (vshTreePrint(ctl, vshNodeListLookup,
+                             &arrays, num_devices, i) < 0)
                 ret = false;
         }
         for (i = 0 ; i < num_devices ; i++) {
-- 
1.7.7.3


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