]> xenbits.xensource.com Git - libvirt.git/commitdiff
xen: Initialize variable before using
authorPeter Krempa <pkrempa@redhat.com>
Thu, 24 Jan 2013 12:57:14 +0000 (13:57 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 24 Jan 2013 12:57:14 +0000 (13:57 +0100)
Commit 87b4c10c6cf02251dd8c29b5b895bebc6ec297f9 added code that may call
the virCapabilitiesClearHostNUMACellCPUTopology function with
uninitialized second argument. Although the value wouldn't be used some
compilers whine about that.

src/xen/xend_internal.c

index d0e54a8f9cc81a488af3c2eb9d5cd255febe2f7f..98ea6b484788e2c192417af039efc3513b0d3ec6 100644 (file)
@@ -1115,7 +1115,7 @@ sexpr_to_xend_topology(const struct sexpr *root,
     virCapsHostNUMACellCPUPtr cpuInfo = NULL;
     int cell, cpu, nb_cpus;
     int n = 0;
-    int numCpus;
+    int numCpus = 0;
 
     nodeToCpu = sexpr_node(root, "node/node_to_cpu");
     if (nodeToCpu == NULL)