[libvirt PATCH v2 26/51] domain_conf: Use virXMLPropTristateXXX in virDomainChrSourceDefParseTCP

[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 329f42d6dd..9822f4f451 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -11704,15 +11704,8 @@ virDomainChrSourceDefParseTCP(virDomainChrSourceDefPtr def,
     def->data.tcp.host = virXMLPropString(source, "host");
     def->data.tcp.service = virXMLPropString(source, "service");
 
-    if ((tmp = virXMLPropString(source, "tls"))) {
-        if ((def->data.tcp.haveTLS = virTristateBoolTypeFromString(tmp)) <= 0) {
-            virReportError(VIR_ERR_XML_ERROR,
-                           _("unknown chardev 'tls' setting '%s'"),
-                           tmp);
-            return -1;
-        }
-        VIR_FREE(tmp);
-    }
+    if (virXMLPropTristateBool(source, "tls", false, &def->data.tcp.haveTLS) < 0)
+        return -1;
 
     if ((flags & VIR_DOMAIN_DEF_PARSE_STATUS) &&
         (tmp = virXMLPropString(source, "tlsFromConfig"))) {
-- 
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