]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemuBuildControllersCommandLine: use i instead of j as the counter
authorJán Tomko <jtomko@redhat.com>
Wed, 16 Jan 2019 07:47:06 +0000 (08:47 +0100)
committerJán Tomko <jtomko@redhat.com>
Fri, 25 Jan 2019 13:58:43 +0000 (14:58 +0100)
Now that the nested loop is gone.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Cole Robinson <crobinso@redhat.com>
src/qemu/qemu_command.c

index 250a484c40daa967ea959f9c341a7c114c5706d0..3e46f3ced3c1e6a4865e98e2d0cdce3214c4a5d2 100644 (file)
@@ -3208,7 +3208,7 @@ qemuBuildControllersCommandLine(virCommandPtr cmd,
                                 const virDomainDef *def,
                                 virQEMUCapsPtr qemuCaps)
 {
-    size_t j;
+    size_t i;
     int contOrder[] = {
         /*
          * List of controller types that we add commandline args for,
@@ -3237,8 +3237,8 @@ qemuBuildControllersCommandLine(virCommandPtr cmd,
     };
     int ret = -1;
 
-    for (j = 0; j < ARRAY_CARDINALITY(contOrder); j++) {
-        if (qemuBuildControllersByTypeCommandLine(cmd, def, qemuCaps, contOrder[j]) < 0)
+    for (i = 0; i < ARRAY_CARDINALITY(contOrder); i++) {
+        if (qemuBuildControllersByTypeCommandLine(cmd, def, qemuCaps, contOrder[i]) < 0)
             goto cleanup;
     }