Fix parsing of bond interface XML
Fix parsing of bond interface XML

Noticed that parsing bond interface XML containing the miimon element
fails

  <interface type="bond" name="bond0">
    ...
    <bond mode="active-backup">
      <miimon freq="100" carrier="netif"/>
      ...
    </bond>
  </interface>

This configuration does not contain the optional updelay and downdelay
attributes, but parsing will fail due to returning the result of
virXPathULong (a -1 when the attribute doesn't exist) from
virInterfaceDefParseBond after examining the updelay attribute.

While fixing this bug, cleanup the function to use virXPathInt instead
of virXPathULong, and store the result directly instead of using a tmp
variable.  Using virXPathInt actually fixes a potential silent
truncation bug noted by Eric Blake.

Also, there is no cleanup in the error label.  Remove the label,
returning failure where failure occurs and success if the end of the
function is reached.

jfehlig/libvirt,olafhering/libvirt,nertpinx/libvirt,taget/libvirt,zhlcindy/libvirt-1.1.4-maintain,jfehlig/libvirt,VenkatDatta/libvirt,taget/libvirt,jardasgit/libvirt,zhlcindy/libvirt-1.1.4-maintain,andreabolognani/libvirt,andreabolognani/libvirt,elmarco/libvirt,fabianfreyer/libvirt,rlaager/libvirt,libvirt/libvirt,eskultety/libvirt,jardasgit/libvirt,shugaoye/libvirt,agx/libvirt,nertpinx/libvirt,zhlcindy/libvirt-1.1.4-maintain,datto/libvirt,taget/libvirt,shugaoye/libvirt,rlaager/libvirt,shugaoye/libvirt,fabianfreyer/libvirt,agx/libvirt,VenkatDatta/libvirt,elmarco/libvirt,nertpinx/libvirt,olafhering/libvirt,crobinso/libvirt,libvirt/libvirt,VenkatDatta/libvirt,elmarco/libvirt,rlaager/libvirt,cbosdo/libvirt,fabianfreyer/libvirt,elmarco/libvirt,fabianfreyer/libvirt,cbosdo/libvirt,nertpinx/libvirt,andreabolognani/libvirt,jardasgit/libvirt,taget/libvirt,crobinso/libvirt,libvirt/libvirt,shugaoye/libvirt,zippy2/libvirt,elmarco/libvirt,datto/libvirt,cbosdo/libvirt,eskultety/libvirt,agx/libvirt,taget/libvirt,cbosdo/libvirt,eskultety/libvirt,datto/libvirt,jfehlig/libvirt,crobinso/libvirt,andreabolognani/libvirt,jardasgit/libvirt,libvirt/libvirt,andreabolognani/libvirt,nertpinx/libvirt,VenkatDatta/libvirt,datto/libvirt,zhlcindy/libvirt-1.1.4-maintain,eskultety/libvirt,shugaoye/libvirt,cbosdo/libvirt,zippy2/libvirt,zhlcindy/libvirt-1.1.4-maintain,crobinso/libvirt,zippy2/libvirt,eskultety/libvirt,agx/libvirt,rlaager/libvirt,datto/libvirt,zippy2/libvirt,rlaager/libvirt,jfehlig/libvirt,agx/libvirt,olafhering/libvirt,fabianfreyer/libvirt,jardasgit/libvirt,VenkatDatta/libvirt,olafhering/libvirt