This function expects flags that are bitwise-or values of the
VIR_DOMAIN_DEF_PARSE_* constants, but we were passing two flags that
were not part of this flag set:
 - 1 < VIR_DOMAIN_VIRT_HYPERV
 - VIR_DOMAIN_XML_INACTIVE

Replace VIR_DOMAIN_XML_INACTIVE with VIR_DOMAIN_DEF_PARSE_INACTIVE
(which fortunately happens to be the exact same value). Remove flag
"1 < VIR_DOMAIN_VIRT_HYPERV", which turns out to the the same value
as the flag VIR_DOMAIN_DEF_PARSE_ABI_UPDATE_MIGRATION, which seems
unnecessary and undesirable here.

Signed-off-by: Jonathon Jongsma <[email protected]>
---
 src/hyperv/hyperv_driver.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/hyperv/hyperv_driver.c b/src/hyperv/hyperv_driver.c
index b01b4919fe..8832769c7b 100644
--- a/src/hyperv/hyperv_driver.c
+++ b/src/hyperv/hyperv_driver.c
@@ -2937,7 +2937,7 @@ hypervDomainDefineXML(virConnectPtr conn, const char *xml)
 
     /* parse xml */
     def = virDomainDefParseString(xml, priv->xmlopt, NULL,
-                                  1 << VIR_DOMAIN_VIRT_HYPERV | 
VIR_DOMAIN_XML_INACTIVE);
+                                  VIR_DOMAIN_DEF_PARSE_INACTIVE);
 
     if (!def)
         goto error;
-- 
2.53.0

Reply via email to