]> xenbits.xensource.com Git - libvirt.git/commitdiff
test_driver: Replace magic constant
authorTomáš Ryšavý <tom.rysavy.0@gmail.com>
Thu, 15 Sep 2016 08:27:03 +0000 (10:27 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 15 Sep 2016 13:28:22 +0000 (15:28 +0200)
In testOpenDefault we create a virtual computer that is later
presented to user. We also pretend to have NUMA cells and
initialize them somehow. But whilst doing so a magical constant
is used. Drop it.

Signed-off-by: Tomáš Ryšavý <tom.rysavy.0@gmail.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
src/test/test_driver.c

index 8dd757987488e076de6a2029445092c4be88a2c2..420e08171b078280033ccdc35ed76491198193ef 100644 (file)
@@ -1264,7 +1264,7 @@ testOpenDefault(virConnectPtr conn)
 
     /* Numa setup */
     privconn->numCells = 2;
-    for (u = 0; u < 2; ++u) {
+    for (u = 0; u < privconn->numCells; ++u) {
         privconn->cells[u].numCpus = 8;
         privconn->cells[u].mem = (u + 1) * 2048 * 1024;
     }