]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
conf: Don't pass PROP_NONZERO to virXMLPropTristateBool()
authorAndrea Bolognani <abologna@redhat.com>
Thu, 24 Mar 2022 13:04:09 +0000 (14:04 +0100)
committerAndrea Bolognani <abologna@redhat.com>
Tue, 5 Apr 2022 11:40:07 +0000 (13:40 +0200)
It's the default behavior.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/conf/domain_conf.c
src/conf/interface_conf.c

index 77671c233f0d3f898662a2eeaabdc6a8c0500e8b..80ce04f7903e8af628e385b8de2483c1969d1bb5 100644 (file)
@@ -7868,7 +7868,7 @@ virSecurityLabelDefParseXML(xmlXPathContextPtr ctxt,
         seclabel->type == VIR_DOMAIN_SECLABEL_NONE)
         seclabel->relabel = false;
 
-    if (virXMLPropTristateBool(ctxt->node, "relabel", VIR_XML_PROP_NONZERO, &relabel) < 0)
+    if (virXMLPropTristateBool(ctxt->node, "relabel", VIR_XML_PROP_NONE, &relabel) < 0)
         return NULL;
 
     virTristateBoolToBool(relabel, &seclabel->relabel);
@@ -8085,7 +8085,7 @@ virSecurityDeviceLabelDefParseXML(virSecurityDeviceLabelDef ***seclabels_rtn,
             seclabels[i]->model = g_steal_pointer(&model);
         }
 
-        if (virXMLPropTristateBool(list[i], "relabel", VIR_XML_PROP_NONZERO, &t) < 0)
+        if (virXMLPropTristateBool(list[i], "relabel", VIR_XML_PROP_NONE, &t) < 0)
             goto error;
 
         seclabels[i]->relabel = true;
@@ -8094,7 +8094,7 @@ virSecurityDeviceLabelDefParseXML(virSecurityDeviceLabelDef ***seclabels_rtn,
         /* labelskip is only parsed on live images */
         seclabels[i]->labelskip = false;
         if (!(flags & VIR_DOMAIN_DEF_PARSE_INACTIVE)) {
-            if (virXMLPropTristateBool(list[i], "labelskip", VIR_XML_PROP_NONZERO, &t) < 0)
+            if (virXMLPropTristateBool(list[i], "labelskip", VIR_XML_PROP_NONE, &t) < 0)
                 goto error;
 
             virTristateBoolToBool(t, &seclabels[i]->labelskip);
index 424650489ce1ba1921e8767c1d2def153dcfee97..ba5dc9961a76c9f3a12291a218fa3ac38c6834fe 100644 (file)
@@ -233,7 +233,7 @@ virInterfaceDefParseDhcp(virInterfaceProtocolDef *def,
     def->dhcp = 1;
     def->peerdns = -1;
 
-    if (virXMLPropTristateBool(dhcp, "peerdns", VIR_XML_PROP_NONZERO, &peerdns) < 0)
+    if (virXMLPropTristateBool(dhcp, "peerdns", VIR_XML_PROP_NONE, &peerdns) < 0)
         return -1;
 
     if (peerdns != VIR_TRISTATE_BOOL_ABSENT) {