[libvirt] [PATCH 2/3] conf: Clean up virDomainNumaDefCPUFormatXML

John Ferlan jferlan at redhat.com
Fri Nov 24 17:18:41 UTC 2017


Don't use a unary comparison for an int value - compare against zero
directly instead.

Signed-off-by: John Ferlan <jferlan at redhat.com>
---
 src/conf/numa_conf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/conf/numa_conf.c b/src/conf/numa_conf.c
index 3aae705a5d..eadf8f2282 100644
--- a/src/conf/numa_conf.c
+++ b/src/conf/numa_conf.c
@@ -992,7 +992,7 @@ virDomainNumaDefCPUFormatXML(virBufferPtr buf,
                               virDomainMemoryAccessTypeToString(memAccess));
 
         ndistances = def->mem_nodes[i].ndistances;
-        if (!ndistances) {
+        if (ndistances == 0) {
             virBufferAddLit(buf, "/>\n");
         } else {
             size_t j;
-- 
2.13.6




More information about the libvir-list mailing list