[libvirt PATCH] conf: virDomainDefParseMemory: remove pointless assignment

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Evaluate the XPath as a boolean, instead of trying to get a node
out of it.

Signed-off-by: Ján Tomko <jtomko@xxxxxxxxxx>
---
 src/conf/domain_conf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 9fe930a5d8..709ca53790 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -19184,7 +19184,7 @@ virDomainDefParseMemory(virDomainDef *def,
         }
     }
 
-    if ((node = virXPathNode("./memoryBacking/nosharepages", ctxt)))
+    if (virXPathBoolean("boolean(./memoryBacking/nosharepages)", ctxt))
         def->mem.nosharepages = true;
 
     if (virXPathBoolean("boolean(./memoryBacking/locked)", ctxt))
-- 
2.34.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux