[PATCH 3/4] virsh: Remove unused setting of 'br_node' and 'if_node'

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

 



---
 tools/virsh-interface.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/virsh-interface.c b/tools/virsh-interface.c
index cd14e89..1e047b2 100644
--- a/tools/virsh-interface.c
+++ b/tools/virsh-interface.c
@@ -920,7 +920,7 @@ cmdInterfaceUnbridge(vshControl *ctl, const vshCmd *cmd)
     int if_xml_size;
     xmlDocPtr xml_doc = NULL;
     xmlXPathContextPtr ctxt = NULL;
-    xmlNodePtr top_node, br_node, if_node, cur;
+    xmlNodePtr top_node, if_node, cur;
 
     /* Get a handle to the original device */
     if (!(br_handle = vshCommandOptInterfaceBy(ctl, cmd, "bridge",
@@ -963,12 +963,12 @@ cmdInterfaceUnbridge(vshControl *ctl, const vshCmd *cmd)
     VIR_FREE(if_name);
 
     /* Find the <bridge> node under <interface>. */
-    if (!(br_node = virXPathNode("./bridge", ctxt))) {
+    if (virXPathNode("./bridge", ctxt) == NULL) {
         vshError(ctl, "%s", _("No bridge node in xml document"));
         goto cleanup;
     }
 
-    if ((if_node = virXPathNode("./bridge/interface[2]", ctxt))) {
+    if (virXPathNode("./bridge/interface[2]", ctxt) != NULL) {
         vshError(ctl, "%s", _("Multiple interfaces attached to bridge"));
         goto cleanup;
     }
-- 
1.7.11.7

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]