1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-10-23 23:34:16 +03:00

use virXMLNodeNameEqual instead of xmlStrEqual

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
Pavel Hrdina
2017-08-14 14:31:52 +02:00
parent 5bd8a1c5d8
commit 068606f85c
20 changed files with 152 additions and 151 deletions

View File

@@ -939,9 +939,9 @@ cmdInterfaceBridge(vshControl *ctl, const vshCmd *cmd)
cur = cur->next;
if ((old->type == XML_ELEMENT_NODE) &&
(xmlStrEqual(old->name, BAD_CAST "mac") || /* ethernet stuff to move down */
xmlStrEqual(old->name, BAD_CAST "bond") || /* bond stuff to move down */
xmlStrEqual(old->name, BAD_CAST "vlan"))) { /* vlan stuff to move down */
(virXMLNodeNameEqual(old, "mac") || /* ethernet stuff to move down */
virXMLNodeNameEqual(old, "bond") || /* bond stuff to move down */
virXMLNodeNameEqual(old, "vlan"))) { /* vlan stuff to move down */
xmlUnlinkNode(old);
if (!xmlAddChild(if_node, old)) {
vshError(ctl, _("Failed to move '%s' element in xml document"), old->name);
@@ -1130,9 +1130,9 @@ cmdInterfaceUnbridge(vshControl *ctl, const vshCmd *cmd)
cur = cur->next;
if ((old->type == XML_ELEMENT_NODE) &&
(xmlStrEqual(old->name, BAD_CAST "mac") || /* ethernet stuff to move down */
xmlStrEqual(old->name, BAD_CAST "bond") || /* bond stuff to move down */
xmlStrEqual(old->name, BAD_CAST "vlan"))) { /* vlan stuff to move down */
(virXMLNodeNameEqual(old, "mac") || /* ethernet stuff to move down */
virXMLNodeNameEqual(old, "bond") || /* bond stuff to move down */
virXMLNodeNameEqual(old, "vlan"))) { /* vlan stuff to move down */
xmlUnlinkNode(old);
if (!xmlAddChild(top_node, old)) {
vshError(ctl, _("Failed to move '%s' element in xml document"), old->name);