]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
conf: domain: Don't initialize virTristateBool local variables used for virXMLPropTri...
authorPeter Krempa <pkrempa@redhat.com>
Thu, 6 May 2021 14:22:41 +0000 (16:22 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Fri, 7 May 2021 08:06:18 +0000 (10:06 +0200)
virXMLPropTristateBool already initializes the value to
VIR_TRISTATE_BOOL_ABSENT so we no longer need to do that for certain
local variables.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/conf/domain_conf.c

index 2bc2e55ee488fd97eaf65a88677ed5288651e06f..ea99a4c40a85304a758a4d3204743a06fa337727 100644 (file)
@@ -12569,7 +12569,7 @@ virDomainGraphicsDefParseXMLSDL(virDomainGraphicsDef *def,
 {
     VIR_XPATH_NODE_AUTORESTORE(ctxt)
     xmlNodePtr glNode;
-    virTristateBool fullscreen = VIR_TRISTATE_BOOL_NO;
+    virTristateBool fullscreen;
 
     ctxt->node = node;
 
@@ -12640,7 +12640,7 @@ static int
 virDomainGraphicsDefParseXMLDesktop(virDomainGraphicsDef *def,
                                     xmlNodePtr node)
 {
-    virTristateBool fullscreen = VIR_TRISTATE_BOOL_NO;
+    virTristateBool fullscreen;
 
     if (virXMLPropTristateBool(node, "fullscreen", VIR_XML_PROP_NONE,
                                &fullscreen) < 0)
@@ -12662,7 +12662,7 @@ virDomainGraphicsDefParseXMLSpice(virDomainGraphicsDef *def,
     g_autofree xmlNodePtr *node_list = NULL;
     int n = 0;
     size_t i = 0;
-    virTristateBool autoport = VIR_TRISTATE_BOOL_NO;
+    virTristateBool autoport;
     xmlNodePtr cur;
     VIR_XPATH_NODE_AUTORESTORE(ctxt)