]> xenbits.xensource.com Git - libvirt.git/commitdiff
virsh: Remove unused setting of 'br_node' and 'if_node'
authorJohn Ferlan <jferlan@redhat.com>
Tue, 15 Jan 2013 18:38:18 +0000 (13:38 -0500)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 15 Jan 2013 22:43:10 +0000 (23:43 +0100)
tools/virsh-interface.c

index cd14e89170fc22576c1df8e0628fe1fe905cb52e..1e047b21535dffde1255df95922c8350a6b66f6e 100644 (file)
@@ -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;
     }