[libvirt PATCH v3 34/51] domain_conf: Use virXMLPropTristateXXX in virDomainAudioOSSParse

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

 



Signed-off-by: Tim Wiederhake <twiederh@xxxxxxxxxx>
---
 src/conf/domain_conf.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index afd37e3e49..c341091c99 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -13837,18 +13837,12 @@ static int
 virDomainAudioOSSParse(virDomainAudioIOOSSPtr def,
                        xmlNodePtr node)
 {
-    g_autofree char *tryPoll = virXMLPropString(node, "tryPoll");
     g_autofree char *bufferCount = virXMLPropString(node, "bufferCount");
 
     def->dev = virXMLPropString(node, "dev");
 
-    if (tryPoll &&
-        ((def->tryPoll =
-          virTristateBoolTypeFromString(tryPoll)) <= 0)) {
-        virReportError(VIR_ERR_XML_ERROR,
-                       _("unknown 'tryPoll' value '%s'"), tryPoll);
+    if (virXMLPropTristateBool(node, "tryPoll", false, &def->tryPoll) < 0)
         return -1;
-    }
 
     if (bufferCount &&
         virStrToLong_ui(bufferCount, NULL, 10,
-- 
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