[PATCH 11/17] conf: domain: Don't initialize virTristateBool local variables used for virXMLPropTristateBool

Peter Krempa pkrempa at redhat.com
Thu May 6 15:31:03 UTC 2021


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 at redhat.com>
---
 src/conf/domain_conf.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 2bc2e55ee4..ea99a4c40a 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -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)

-- 
2.30.2




More information about the libvir-list mailing list