Signed-off-by: Tim Wiederhake <twiederh(a)redhat.com>
---
src/conf/domain_conf.c | 15 +++------------
1 file changed, 3 insertions(+), 12 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 7fb096e6d9..0f3be88235 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -11777,20 +11777,11 @@ static int
virDomainChrSourceDefParseFile(virDomainChrSourceDefPtr def,
xmlNodePtr source)
{
- g_autofree char *append = NULL;
-
def->data.file.path = virXMLPropString(source, "path");
- if ((append = virXMLPropString(source, "append"))) {
- int value;
- if ((value = virTristateSwitchTypeFromString(append)) <= 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Invalid append attribute value '%s'"),
- append);
- return -1;
- }
- def->data.file.append = value;
- }
+ if (virXMLPropTristateSwitch(source, "append", false,
+ &def->data.file.append) < 0)
+ return -1;
return 0;
}
--
2.26.2