]> git.ipfire.org Git - thirdparty/libvirt.git/commit
interface: clean up virInterfaceDefParseXML
authorLaine Stump <laine@laine.org>
Thu, 19 Jun 2014 09:51:38 +0000 (12:51 +0300)
committerLaine Stump <laine@laine.org>
Fri, 20 Jun 2014 08:49:06 +0000 (11:49 +0300)
commit3aa8197393c701fc40dda16f6e15e0b6f4cbe1c0
tree2756ed9faf92671369914b73b70eca15a355314f
parent7edc46ac26af48d3a31134d5cb6da04e29202a8f
interface: clean up virInterfaceDefParseXML

the switch cases for the 4 different interface types had repetitive
code which has now been pulled out as common. While touching those
lines, some extra usage of "!= NULL" etc has been eliminated to make
things more compact and inline with current coding practices.

NB: parentIfType == VIR_INTERFACE_TYPE_LAST means that this is a
toplevel interface (not a subordinate of a bridge or bond). Only
toplevel interfaces can have a start mode, mtu, or IP address element.
src/conf/interface_conf.c