[libvirt PATCH v2 23/51] domain_conf: Use virXMLPropTristateXXX in virDomainActualNetDefParseXML

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Tim Wiederhake <twiederh@xxxxxxxxxx>
---
 src/conf/domain_conf.c | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index ef7eed5682..bcc89c0afc 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -10436,7 +10436,6 @@ virDomainActualNetDefParseXML(xmlNodePtr node,
     g_autofree char *type = NULL;
     g_autofree char *mode = NULL;
     g_autofree char *addrtype = NULL;
-    g_autofree char *trustGuestRxFilters = NULL;
     g_autofree char *macTableManager = NULL;
 
     actual = g_new0(virDomainActualNetDef, 1);
@@ -10464,15 +10463,9 @@ virDomainActualNetDefParseXML(xmlNodePtr node,
         goto error;
     }
 
-    trustGuestRxFilters = virXMLPropString(node, "trustGuestRxFilters");
-    if (trustGuestRxFilters &&
-        ((actual->trustGuestRxFilters
-          = virTristateBoolTypeFromString(trustGuestRxFilters)) <= 0)) {
-        virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                       _("unknown trustGuestRxFilters value '%s'"),
-                       trustGuestRxFilters);
+    if (virXMLPropTristateBool(node, "trustGuestRxFilters", false,
+                               &actual->trustGuestRxFilters) < 0)
         goto error;
-    }
 
     virtPortNode = virXPathNode("./virtualport", ctxt);
     if (virtPortNode) {
-- 
2.26.2




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux