[libvirt PATCH v3 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 | 14 +++-----------
 1 file changed, 3 insertions(+), 11 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index f17c979e31..6a43fb2588 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -10435,7 +10435,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);
@@ -10463,16 +10462,9 @@ virDomainActualNetDefParseXML(xmlNodePtr node,
         goto error;
     }
 
-    if ((trustGuestRxFilters = virXMLPropString(node, "trustGuestRxFilters"))) {
-        int value;
-        if ((value = virTristateBoolTypeFromString(trustGuestRxFilters)) <= 0) {
-            virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                           _("unknown trustGuestRxFilters value '%s'"),
-                           trustGuestRxFilters);
-            goto error;
-        }
-        actual->trustGuestRxFilters = value;
-    }
+    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