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.
Showing
想要评论请 注册 或 登录