]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
virInterfaceDefParseBond: avoid dead stores
authorJim Meyering <meyering@redhat.com>
Fri, 5 Mar 2010 15:18:47 +0000 (16:18 +0100)
committerJim Meyering <meyering@redhat.com>
Fri, 5 Mar 2010 22:24:47 +0000 (23:24 +0100)
* src/conf/interface_conf.c (virInterfaceDefParseBond): Avoid dead stores
to local, "node".  Remove declaration, too.

src/conf/interface_conf.c

index a0d2dfabc3dbcbd0bd063a559fb755a6e103d198..f60b36a9d09cf2167bc89da84eda83bd5fafce24 100644 (file)
@@ -570,7 +570,6 @@ error:
 static int
 virInterfaceDefParseBond(virInterfaceDefPtr def,
                          xmlXPathContextPtr ctxt) {
-    xmlNodePtr node;
     int ret = -1;
     unsigned long tmp;
 
@@ -582,8 +581,7 @@ virInterfaceDefParseBond(virInterfaceDefPtr def,
     if (ret != 0)
        goto error;
 
-    node = virXPathNode("./miimon[1]", ctxt);
-    if (node != NULL) {
+    if (virXPathNode("./miimon[1]", ctxt) != NULL) {
         def->data.bond.monit = VIR_INTERFACE_BOND_MONIT_MII;
 
         ret = virXPathULong("string(./miimon/@freq)", ctxt, &tmp);
@@ -618,7 +616,7 @@ virInterfaceDefParseBond(virInterfaceDefPtr def,
             goto error;
         }
 
-    } else if ((node = virXPathNode("./arpmon[1]", ctxt)) != NULL) {
+    } else if (virXPathNode("./arpmon[1]", ctxt) != NULL) {
 
         def->data.bond.monit = VIR_INTERFACE_BOND_MONIT_ARP;