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

[libvirt] [PATCH 14/31] src/qemu: Remove the whitespace before '; '



---
 src/qemu/qemu_agent.c        |   4 +-
 src/qemu/qemu_capabilities.c |  32 ++++----
 src/qemu/qemu_cgroup.c       |   4 +-
 src/qemu/qemu_command.c      | 170 +++++++++++++++++++++----------------------
 src/qemu/qemu_conf.c         |   4 +-
 src/qemu/qemu_domain.c       |  12 +--
 src/qemu/qemu_driver.c       |  30 ++++----
 src/qemu/qemu_hostdev.c      |   8 +-
 src/qemu/qemu_hotplug.c      |  14 ++--
 src/qemu/qemu_migration.c    |   6 +-
 src/qemu/qemu_monitor.c      |   2 +-
 src/qemu/qemu_monitor_json.c |  34 ++++-----
 src/qemu/qemu_monitor_text.c |   2 +-
 src/qemu/qemu_process.c      |  44 +++++------
 14 files changed, 183 insertions(+), 183 deletions(-)

diff --git a/src/qemu/qemu_agent.c b/src/qemu/qemu_agent.c
index d116b23..c7a9681 100644
--- a/src/qemu/qemu_agent.c
+++ b/src/qemu/qemu_agent.c
@@ -139,7 +139,7 @@ qemuAgentEscapeNonPrintable(const char *text)
 {
     int i;
     virBuffer buf = VIR_BUFFER_INITIALIZER;
-    for (i = 0 ; text[i] != '\0' ; i++) {
+    for (i = 0; text[i] != '\0'; i++) {
         if (text[i] == '\\')
             virBufferAddLit(&buf, "\\\\");
         else if (c_isprint(text[i]) || text[i] == '\n' ||
@@ -281,7 +281,7 @@ qemuAgentIOProcessEvent(qemuAgentPtr mon,
     }
 
 /*
-    for (i = 0 ; i < ARRAY_CARDINALITY(eventHandlers) ; i++) {
+    for (i = 0; i < ARRAY_CARDINALITY(eventHandlers); i++) {
         if (STREQ(eventHandlers[i].type, type)) {
             virJSONValuePtr data = virJSONValueObjectGet(obj, "data");
             VIR_DEBUG("handle %s handler=%p data=%p", type,
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 82129a2..d7798e4 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -905,7 +905,7 @@ virCapsPtr virQEMUCapsInit(virQEMUCapsCachePtr cache)
      * so just probe for them all - we gracefully fail
      * if a qemu-system-$ARCH binary can't be found
      */
-    for (i = 0 ; i < VIR_ARCH_LAST ; i++)
+    for (i = 0; i < VIR_ARCH_LAST; i++)
         if (virQEMUCapsInitGuest(caps, cache,
                                  hostarch,
                                  i) < 0)
@@ -1463,8 +1463,8 @@ virQEMUCapsProcessStringFlags(virQEMUCapsPtr qemuCaps,
                               char *const*values)
 {
     size_t i, j;
-    for (i = 0 ; i < nflags ; i++) {
-        for (j = 0 ; j < nvalues ; j++) {
+    for (i = 0; i < nflags; i++) {
+        for (j = 0; j < nvalues; j++) {
             if (STREQ(values[j], flags[i].value)) {
                 virQEMUCapsSet(qemuCaps, flags[i].flag);
                 break;
@@ -1479,7 +1479,7 @@ virQEMUCapsFreeStringList(size_t len,
                           char **values)
 {
     size_t i;
-    for (i = 0 ; i < len ; i++)
+    for (i = 0; i < len; i++)
         VIR_FREE(values[i]);
     VIR_FREE(values);
 }
@@ -1600,7 +1600,7 @@ virQEMUCapsParseDeviceStr(virQEMUCapsPtr qemuCaps, const char *str)
                                   nvalues, values);
     virQEMUCapsFreeStringList(nvalues, values);
 
-    for (i = 0 ; i < ARRAY_CARDINALITY(virQEMUCapsObjectProps); i++) {
+    for (i = 0; i < ARRAY_CARDINALITY(virQEMUCapsObjectProps); i++) {
         const char *type = virQEMUCapsObjectProps[i].type;
         if ((nvalues = virQEMUCapsParseDeviceStrObjectProps(str,
                                                             type,
@@ -1740,7 +1740,7 @@ virQEMUCapsPtr virQEMUCapsNewCopy(virQEMUCapsPtr qemuCaps)
     if (VIR_ALLOC_N(ret->cpuDefinitions, qemuCaps->ncpuDefinitions) < 0)
         goto no_memory;
     ret->ncpuDefinitions = qemuCaps->ncpuDefinitions;
-    for (i = 0 ; i < qemuCaps->ncpuDefinitions ; i++) {
+    for (i = 0; i < qemuCaps->ncpuDefinitions; i++) {
         if (!(ret->cpuDefinitions[i] = strdup(qemuCaps->cpuDefinitions[i])))
             goto no_memory;
     }
@@ -1750,7 +1750,7 @@ virQEMUCapsPtr virQEMUCapsNewCopy(virQEMUCapsPtr qemuCaps)
     if (VIR_ALLOC_N(ret->machineAliases, qemuCaps->nmachineTypes) < 0)
         goto no_memory;
     ret->nmachineTypes = qemuCaps->nmachineTypes;
-    for (i = 0 ; i < qemuCaps->nmachineTypes ; i++) {
+    for (i = 0; i < qemuCaps->nmachineTypes; i++) {
         if (!(ret->machineTypes[i] = strdup(qemuCaps->machineTypes[i])))
             goto no_memory;
         if (qemuCaps->machineAliases[i] &&
@@ -1772,14 +1772,14 @@ void virQEMUCapsDispose(void *obj)
     virQEMUCapsPtr qemuCaps = obj;
     size_t i;
 
-    for (i = 0 ; i < qemuCaps->nmachineTypes ; i++) {
+    for (i = 0; i < qemuCaps->nmachineTypes; i++) {
         VIR_FREE(qemuCaps->machineTypes[i]);
         VIR_FREE(qemuCaps->machineAliases[i]);
     }
     VIR_FREE(qemuCaps->machineTypes);
     VIR_FREE(qemuCaps->machineAliases);
 
-    for (i = 0 ; i < qemuCaps->ncpuDefinitions ; i++) {
+    for (i = 0; i < qemuCaps->ncpuDefinitions; i++) {
         VIR_FREE(qemuCaps->cpuDefinitions[i]);
     }
     VIR_FREE(qemuCaps->cpuDefinitions);
@@ -1907,7 +1907,7 @@ int virQEMUCapsGetMachineTypesCaps(virQEMUCapsPtr qemuCaps,
         goto no_memory;
     *nmachines = qemuCaps->nmachineTypes;
 
-    for (i = 0 ; i < qemuCaps->nmachineTypes ; i++) {
+    for (i = 0; i < qemuCaps->nmachineTypes; i++) {
         virCapsGuestMachinePtr mach;
         if (VIR_ALLOC(mach) < 0)
             goto no_memory;
@@ -1943,7 +1943,7 @@ const char *virQEMUCapsGetCanonicalMachine(virQEMUCapsPtr qemuCaps,
     if (!name)
         return NULL;
 
-    for (i = 0 ; i < qemuCaps->nmachineTypes ; i++) {
+    for (i = 0; i < qemuCaps->nmachineTypes; i++) {
         if (!qemuCaps->machineAliases[i])
             continue;
         if (STREQ(qemuCaps->machineAliases[i], name))
@@ -1965,7 +1965,7 @@ virQEMUCapsProbeQMPCommands(virQEMUCapsPtr qemuCaps,
     if ((ncommands = qemuMonitorGetCommands(mon, &commands)) < 0)
         return -1;
 
-    for (i = 0 ; i < ncommands ; i++) {
+    for (i = 0; i < ncommands; i++) {
         char *name = commands[i];
         if (STREQ(name, "system_wakeup"))
             virQEMUCapsSet(qemuCaps, QEMU_CAPS_WAKEUP);
@@ -2028,7 +2028,7 @@ virQEMUCapsProbeQMPEvents(virQEMUCapsPtr qemuCaps,
     if ((nevents = qemuMonitorGetEvents(mon, &events)) < 0)
         return -1;
 
-    for (i = 0 ; i < nevents ; i++) {
+    for (i = 0; i < nevents; i++) {
         char *name = events[i];
 
         if (STREQ(name, "BALLOON_CHANGE"))
@@ -2059,7 +2059,7 @@ virQEMUCapsProbeQMPObjects(virQEMUCapsPtr qemuCaps,
                                   nvalues, values);
     virQEMUCapsFreeStringList(nvalues, values);
 
-    for (i = 0 ; i < ARRAY_CARDINALITY(virQEMUCapsObjectProps); i++) {
+    for (i = 0; i < ARRAY_CARDINALITY(virQEMUCapsObjectProps); i++) {
         const char *type = virQEMUCapsObjectProps[i].type;
         if ((nvalues = qemuMonitorGetObjectProps(mon,
                                                  type,
@@ -2105,7 +2105,7 @@ virQEMUCapsProbeQMPMachineTypes(virQEMUCapsPtr qemuCaps,
         goto cleanup;
     }
 
-    for (i = 0 ; i < nmachines ; i++) {
+    for (i = 0; i < nmachines; i++) {
         if (machines[i]->alias) {
             if (!(qemuCaps->machineAliases[i] = strdup(machines[i]->alias))) {
                 virReportOOMError();
@@ -2127,7 +2127,7 @@ virQEMUCapsProbeQMPMachineTypes(virQEMUCapsPtr qemuCaps,
     ret = 0;
 
 cleanup:
-    for (i = 0 ; i < nmachines ; i++)
+    for (i = 0; i < nmachines; i++)
         qemuMonitorMachineInfoFree(machines[i]);
     VIR_FREE(machines);
     return ret;
diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c
index ff9a075..dfe819e 100644
--- a/src/qemu/qemu_cgroup.c
+++ b/src/qemu/qemu_cgroup.c
@@ -548,7 +548,7 @@ qemuSetupDevicesCgroup(virQEMUDriverPtr driver,
         goto cleanup;
     }
 
-    for (i = 0; i < vm->def->ndisks ; i++) {
+    for (i = 0; i < vm->def->ndisks; i++) {
         if (qemuSetupDiskCgroup(vm, vm->def->disks[i]) < 0)
             goto cleanup;
     }
@@ -584,7 +584,7 @@ qemuSetupDevicesCgroup(virQEMUDriverPtr driver,
         }
     }
 
-    for (i = 0; deviceACL[i] != NULL ; i++) {
+    for (i = 0; deviceACL[i] != NULL; i++) {
         if (access(deviceACL[i], F_OK) < 0) {
             VIR_DEBUG("Ignoring non-existant device %s",
                       deviceACL[i]);
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 33a1910..77582e6 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -756,7 +756,7 @@ qemuAssignDeviceNetAlias(virDomainDefPtr def, virDomainNetDefPtr net, int idx)
     if (idx == -1) {
         int i;
         idx = 0;
-        for (i = 0 ; i < def->nnets ; i++) {
+        for (i = 0; i < def->nnets; i++) {
             int thisidx;
 
             if (def->nets[i]->type == VIR_DOMAIN_NET_TYPE_HOSTDEV) {
@@ -788,7 +788,7 @@ qemuAssignDeviceHostdevAlias(virDomainDefPtr def, virDomainHostdevDefPtr hostdev
     if (idx == -1) {
         int i;
         idx = 0;
-        for (i = 0 ; i < def->nhostdevs ; i++) {
+        for (i = 0; i < def->nhostdevs; i++) {
             int thisidx;
             if ((thisidx = qemuDomainDeviceAliasIndex(def->hostdevs[i]->info, "hostdev")) < 0) {
                 virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
@@ -824,7 +824,7 @@ qemuAssignDeviceRedirdevAlias(virDomainDefPtr def, virDomainRedirdevDefPtr redir
     if (idx == -1) {
         int i;
         idx = 0;
-        for (i = 0 ; i < def->nredirdevs ; i++) {
+        for (i = 0; i < def->nredirdevs; i++) {
             int thisidx;
             if ((thisidx = qemuDomainDeviceAliasIndex(&def->redirdevs[i]->info, "redir")) < 0) {
                 virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
@@ -865,13 +865,13 @@ qemuAssignDeviceAliases(virDomainDefPtr def, virQEMUCapsPtr qemuCaps)
 {
     int i;
 
-    for (i = 0; i < def->ndisks ; i++) {
+    for (i = 0; i < def->ndisks; i++) {
         if (qemuAssignDeviceDiskAlias(def, def->disks[i], qemuCaps) < 0)
             return -1;
     }
     if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_NET_NAME) ||
         virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE)) {
-        for (i = 0; i < def->nnets ; i++) {
+        for (i = 0; i < def->nnets; i++) {
             /* type='hostdev' interfaces are also on the hostdevs list,
              * and will have their alias assigned with other hostdevs.
              */
@@ -885,55 +885,55 @@ qemuAssignDeviceAliases(virDomainDefPtr def, virQEMUCapsPtr qemuCaps)
     if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE))
         return 0;
 
-    for (i = 0; i < def->nfss ; i++) {
+    for (i = 0; i < def->nfss; i++) {
         if (virAsprintf(&def->fss[i]->info.alias, "fs%d", i) < 0)
             goto no_memory;
     }
-    for (i = 0; i < def->nsounds ; i++) {
+    for (i = 0; i < def->nsounds; i++) {
         if (virAsprintf(&def->sounds[i]->info.alias, "sound%d", i) < 0)
             goto no_memory;
     }
-    for (i = 0; i < def->nhostdevs ; i++) {
+    for (i = 0; i < def->nhostdevs; i++) {
         if (qemuAssignDeviceHostdevAlias(def, def->hostdevs[i], i) < 0)
             return -1;
     }
-    for (i = 0; i < def->nredirdevs ; i++) {
+    for (i = 0; i < def->nredirdevs; i++) {
         if (qemuAssignDeviceRedirdevAlias(def, def->redirdevs[i], i) < 0)
             return -1;
     }
-    for (i = 0; i < def->nvideos ; i++) {
+    for (i = 0; i < def->nvideos; i++) {
         if (virAsprintf(&def->videos[i]->info.alias, "video%d", i) < 0)
             goto no_memory;
     }
-    for (i = 0; i < def->ncontrollers ; i++) {
+    for (i = 0; i < def->ncontrollers; i++) {
         if (qemuAssignDeviceControllerAlias(def->controllers[i]) < 0)
             return -1;
     }
-    for (i = 0; i < def->ninputs ; i++) {
+    for (i = 0; i < def->ninputs; i++) {
         if (virAsprintf(&def->inputs[i]->info.alias, "input%d", i) < 0)
             goto no_memory;
     }
-    for (i = 0; i < def->nparallels ; i++) {
+    for (i = 0; i < def->nparallels; i++) {
         if (virAsprintf(&def->parallels[i]->info.alias, "parallel%d", i) < 0)
             goto no_memory;
     }
-    for (i = 0; i < def->nserials ; i++) {
+    for (i = 0; i < def->nserials; i++) {
         if (virAsprintf(&def->serials[i]->info.alias, "serial%d", i) < 0)
             goto no_memory;
     }
-    for (i = 0; i < def->nchannels ; i++) {
+    for (i = 0; i < def->nchannels; i++) {
         if (virAsprintf(&def->channels[i]->info.alias, "channel%d", i) < 0)
             goto no_memory;
     }
-    for (i = 0; i < def->nconsoles ; i++) {
+    for (i = 0; i < def->nconsoles; i++) {
         if (virAsprintf(&def->consoles[i]->info.alias, "console%d", i) < 0)
             goto no_memory;
     }
-    for (i = 0; i < def->nhubs ; i++) {
+    for (i = 0; i < def->nhubs; i++) {
         if (virAsprintf(&def->hubs[i]->info.alias, "hub%d", i) < 0)
             goto no_memory;
     }
-    for (i = 0; i < def->nsmartcards ; i++) {
+    for (i = 0; i < def->nsmartcards; i++) {
         if (virAsprintf(&def->smartcards[i]->info.alias, "smartcard%d", i) < 0)
             goto no_memory;
     }
@@ -1066,20 +1066,20 @@ qemuDomainPrimeS390VirtioDevices(virDomainDefPtr def,
     */
     int i;
 
-    for (i = 0; i < def->ndisks ; i++) {
+    for (i = 0; i < def->ndisks; i++) {
         if (def->disks[i]->bus == VIR_DOMAIN_DISK_BUS_VIRTIO &&
             def->disks[i]->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE)
             def->disks[i]->info.type = type;
     }
 
-    for (i = 0; i < def->nnets ; i++) {
+    for (i = 0; i < def->nnets; i++) {
         if (STREQ(def->nets[i]->model,"virtio") &&
             def->nets[i]->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE) {
             def->nets[i]->info.type = type;
         }
     }
 
-    for (i = 0; i < def->ncontrollers ; i++) {
+    for (i = 0; i < def->ncontrollers; i++) {
         if ((def->controllers[i]->type ==
              VIR_DOMAIN_CONTROLLER_TYPE_VIRTIO_SERIAL ||
              def->controllers[i]->type ==
@@ -1292,7 +1292,7 @@ int qemuDomainAssignSpaprVIOAddresses(virDomainDefPtr def,
 
     /* Default values match QEMU. See spapr_(llan|vscsi|vty).c */
 
-    for (i = 0 ; i < def->nnets; i++) {
+    for (i = 0; i < def->nnets; i++) {
         if (def->nets[i]->model &&
             STREQ(def->nets[i]->model, "spapr-vlan"))
             def->nets[i]->info.type = VIR_DOMAIN_DEVICE_ADDRESS_TYPE_SPAPRVIO;
@@ -1301,7 +1301,7 @@ int qemuDomainAssignSpaprVIOAddresses(virDomainDefPtr def,
             goto cleanup;
     }
 
-    for (i = 0 ; i < def->ncontrollers; i++) {
+    for (i = 0; i < def->ncontrollers; i++) {
         model = def->controllers[i]->model;
         if (def->controllers[i]->type == VIR_DOMAIN_CONTROLLER_TYPE_SCSI) {
             if (qemuSetScsiControllerModel(def, qemuCaps, &model) < 0)
@@ -1316,7 +1316,7 @@ int qemuDomainAssignSpaprVIOAddresses(virDomainDefPtr def,
             goto cleanup;
     }
 
-    for (i = 0 ; i < def->nserials; i++) {
+    for (i = 0; i < def->nserials; i++) {
         if (def->serials[i]->deviceType == VIR_DOMAIN_CHR_DEVICE_TYPE_SERIAL &&
             (def->os.arch == VIR_ARCH_PPC64) &&
             STREQ(def->os.machine, "pseries"))
@@ -1909,7 +1909,7 @@ qemuAssignDevicePCISlots(virDomainDefPtr def,
     virDevicePCIAddressPtr addrptr;
 
     /* Verify that first IDE and USB controllers (if any) is on the PIIX3, fn 1 */
-    for (i = 0; i < def->ncontrollers ; i++) {
+    for (i = 0; i < def->ncontrollers; i++) {
         /* First IDE controller lives on the PIIX3 at slot=1, function=1 */
         if (def->controllers[i]->type == VIR_DOMAIN_CONTROLLER_TYPE_IDE &&
             def->controllers[i]->idx == 0) {
@@ -2027,7 +2027,7 @@ qemuAssignDevicePCISlots(virDomainDefPtr def,
         }
     }
 
-    for (i = 0; i < def->nfss ; i++) {
+    for (i = 0; i < def->nfss; i++) {
         if (def->fss[i]->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE)
             continue;
 
@@ -2038,7 +2038,7 @@ qemuAssignDevicePCISlots(virDomainDefPtr def,
     }
 
     /* Network interfaces */
-    for (i = 0; i < def->nnets ; i++) {
+    for (i = 0; i < def->nnets; i++) {
         /* type='hostdev' network devices might be USB, and are also
          * in hostdevs list anyway, so handle them with other hostdevs
          * instead of here.
@@ -2052,7 +2052,7 @@ qemuAssignDevicePCISlots(virDomainDefPtr def,
     }
 
     /* Sound cards */
-    for (i = 0; i < def->nsounds ; i++) {
+    for (i = 0; i < def->nsounds; i++) {
         if (def->sounds[i]->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE)
             continue;
         /* Skip ISA sound card, and PCSPK */
@@ -2065,7 +2065,7 @@ qemuAssignDevicePCISlots(virDomainDefPtr def,
     }
 
     /* Device controllers (SCSI, USB, but not IDE, FDC or CCID) */
-    for (i = 0; i < def->ncontrollers ; i++) {
+    for (i = 0; i < def->ncontrollers; i++) {
         /* PCI controllers have been dealt with earlier */
         if (def->controllers[i]->type == VIR_DOMAIN_CONTROLLER_TYPE_PCI)
             continue;
@@ -2095,7 +2095,7 @@ qemuAssignDevicePCISlots(virDomainDefPtr def,
         if (IS_USB2_CONTROLLER(def->controllers[i])) {
             virDevicePCIAddress addr = { 0, 0, 0, 0, false };
             memset(&tmp_addr, 0, sizeof(tmp_addr));
-            for (j = 0 ; j < i ; j++) {
+            for (j = 0; j < i; j++) {
                 if (IS_USB2_CONTROLLER(def->controllers[j]) &&
                     def->controllers[j]->idx == def->controllers[i]->idx) {
                     addr = def->controllers[j]->info.addr.pci;
@@ -2141,7 +2141,7 @@ qemuAssignDevicePCISlots(virDomainDefPtr def,
     }
 
     /* Disks (VirtIO only for now) */
-    for (i = 0; i < def->ndisks ; i++) {
+    for (i = 0; i < def->ndisks; i++) {
         /* Only VirtIO disks use PCI addrs */
         if (def->disks[i]->bus != VIR_DOMAIN_DISK_BUS_VIRTIO)
             continue;
@@ -2165,7 +2165,7 @@ qemuAssignDevicePCISlots(virDomainDefPtr def,
     }
 
     /* Host PCI devices */
-    for (i = 0; i < def->nhostdevs ; i++) {
+    for (i = 0; i < def->nhostdevs; i++) {
         if (def->hostdevs[i]->info->type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE)
             continue;
         if (def->hostdevs[i]->mode != VIR_DOMAIN_HOSTDEV_MODE_SUBSYS ||
@@ -2201,7 +2201,7 @@ qemuAssignDevicePCISlots(virDomainDefPtr def,
     }
 
     /* Further non-primary video cards which have to be qxl type */
-    for (i = 1; i < def->nvideos ; i++) {
+    for (i = 1; i < def->nvideos; i++) {
         if (def->videos[i]->type != VIR_DOMAIN_VIDEO_TYPE_QXL) {
             virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
                            _("non-primary video device must be type of 'qxl'"));
@@ -2212,19 +2212,19 @@ qemuAssignDevicePCISlots(virDomainDefPtr def,
         if (qemuDomainPCIAddressSetNextAddr(addrs, &def->videos[i]->info) < 0)
             goto error;
     }
-    for (i = 0; i < def->ninputs ; i++) {
+    for (i = 0; i < def->ninputs; i++) {
         /* Nada - none are PCI based (yet) */
     }
-    for (i = 0; i < def->nparallels ; i++) {
+    for (i = 0; i < def->nparallels; i++) {
         /* Nada - none are PCI based (yet) */
     }
-    for (i = 0; i < def->nserials ; i++) {
+    for (i = 0; i < def->nserials; i++) {
         /* Nada - none are PCI based (yet) */
     }
-    for (i = 0; i < def->nchannels ; i++) {
+    for (i = 0; i < def->nchannels; i++) {
         /* Nada - none are PCI based (yet) */
     }
-    for (i = 0; i < def->nhubs ; i++) {
+    for (i = 0; i < def->nhubs; i++) {
         /* Nada - none are PCI based (yet) */
     }
 
@@ -6255,7 +6255,7 @@ qemuBuildGraphicsSPICECommandLine(virQEMUDriverConfigPtr cfg,
         break;
     }
 
-    for (i = 0 ; i < VIR_DOMAIN_GRAPHICS_SPICE_CHANNEL_LAST ; i++) {
+    for (i = 0; i < VIR_DOMAIN_GRAPHICS_SPICE_CHANNEL_LAST; i++) {
         switch (graphics->data.spice.channels[i]) {
         case VIR_DOMAIN_GRAPHICS_SPICE_CHANNEL_MODE_SECURE:
             if (tlsPort <= 0) {
@@ -6910,7 +6910,7 @@ qemuBuildCommandLine(virConnectPtr conn,
         if (!emitBootindex) {
             char boot[VIR_DOMAIN_BOOT_LAST+1];
 
-            for (i = 0 ; i < def->os.nBootDevs ; i++) {
+            for (i = 0; i < def->os.nBootDevs; i++) {
                 switch (def->os.bootDevs[i]) {
                 case VIR_DOMAIN_BOOT_CDROM:
                     boot[i] = 'd';
@@ -7003,7 +7003,7 @@ qemuBuildCommandLine(virConnectPtr conn,
         virCommandAddArgList(cmd, "-bootloader", def->os.bootloader, NULL);
     }
 
-    for (i = 0 ; i < def->ndisks ; i++) {
+    for (i = 0; i < def->ndisks; i++) {
         virDomainDiskDefPtr disk = def->disks[i];
 
         if (disk->driverName != NULL &&
@@ -7083,7 +7083,7 @@ qemuBuildCommandLine(virConnectPtr conn,
     if (usbcontroller == 0)
         virCommandAddArg(cmd, "-usb");
 
-    for (i = 0 ; i < def->nhubs ; i++) {
+    for (i = 0; i < def->nhubs; i++) {
         virDomainHubDefPtr hub = def->hubs[i];
         char *optstr;
 
@@ -7101,7 +7101,7 @@ qemuBuildCommandLine(virConnectPtr conn,
         if ((virQEMUCapsGet(qemuCaps, QEMU_CAPS_DRIVE_BOOT) || emitBootindex)) {
             /* bootDevs will get translated into either bootindex=N or boot=on
              * depending on what qemu supports */
-            for (i = 0 ; i < def->os.nBootDevs ; i++) {
+            for (i = 0; i < def->os.nBootDevs; i++) {
                 switch (def->os.bootDevs[i]) {
                 case VIR_DOMAIN_BOOT_CDROM:
                     bootCD = i + 1;
@@ -7116,7 +7116,7 @@ qemuBuildCommandLine(virConnectPtr conn,
             }
         }
 
-        for (i = 0 ; i < def->ndisks ; i++) {
+        for (i = 0; i < def->ndisks; i++) {
             char *optstr;
             int bootindex = 0;
             virDomainDiskDefPtr disk = def->disks[i];
@@ -7212,7 +7212,7 @@ qemuBuildCommandLine(virConnectPtr conn,
             }
         }
     } else {
-        for (i = 0 ; i < def->ndisks ; i++) {
+        for (i = 0; i < def->ndisks; i++) {
             char dev[NAME_MAX];
             char *file;
             const char *fmt;
@@ -7299,7 +7299,7 @@ qemuBuildCommandLine(virConnectPtr conn,
     }
 
     if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_FSDEV)) {
-        for (i = 0 ; i < def->nfss ; i++) {
+        for (i = 0; i < def->nfss; i++) {
             char *optstr;
             virDomainFSDefPtr fs = def->fss[i];
 
@@ -7334,7 +7334,7 @@ qemuBuildCommandLine(virConnectPtr conn,
             /* convert <boot dev='network'/> to bootindex since we didn't emit
              * -boot n
              */
-            for (i = 0 ; i < def->os.nBootDevs ; i++) {
+            for (i = 0; i < def->os.nBootDevs; i++) {
                 if (def->os.bootDevs[i] == VIR_DOMAIN_BOOT_NET) {
                     bootNet = i + 1;
                     break;
@@ -7342,7 +7342,7 @@ qemuBuildCommandLine(virConnectPtr conn,
             }
         }
 
-        for (i = 0 ; i < def->nnets ; i++) {
+        for (i = 0; i < def->nnets; i++) {
             virDomainNetDefPtr net = def->nets[i];
             char *nic, *host;
             char tapfd_name[50] = "";
@@ -7567,7 +7567,7 @@ qemuBuildCommandLine(virConnectPtr conn,
         if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE))
             virCommandAddArgList(cmd, "-serial", "none", NULL);
     } else {
-        for (i = 0 ; i < def->nserials ; i++) {
+        for (i = 0; i < def->nserials; i++) {
             virDomainChrDefPtr serial = def->serials[i];
             char *devstr;
 
@@ -7604,7 +7604,7 @@ qemuBuildCommandLine(virConnectPtr conn,
         if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE))
             virCommandAddArgList(cmd, "-parallel", "none", NULL);
     } else {
-        for (i = 0 ; i < def->nparallels ; i++) {
+        for (i = 0; i < def->nparallels; i++) {
             virDomainChrDefPtr parallel = def->parallels[i];
             char *devstr;
 
@@ -7633,7 +7633,7 @@ qemuBuildCommandLine(virConnectPtr conn,
         }
     }
 
-    for (i = 0 ; i < def->nchannels ; i++) {
+    for (i = 0; i < def->nchannels; i++) {
         virDomainChrDefPtr channel = def->channels[i];
         char *devstr;
         char *addr;
@@ -7703,7 +7703,7 @@ qemuBuildCommandLine(virConnectPtr conn,
     }
 
     /* Explicit console devices */
-    for (i = 0 ; i < def->nconsoles ; i++) {
+    for (i = 0; i < def->nconsoles; i++) {
         virDomainChrDefPtr console = def->consoles[i];
         char *devstr;
 
@@ -7786,7 +7786,7 @@ qemuBuildCommandLine(virConnectPtr conn,
         VIR_FREE(optstr);
     }
 
-    for (i = 0 ; i < def->ninputs ; i++) {
+    for (i = 0; i < def->ninputs; i++) {
         virDomainInputDefPtr input = def->inputs[i];
 
         if (input->bus == VIR_DOMAIN_INPUT_BUS_USB) {
@@ -7805,7 +7805,7 @@ qemuBuildCommandLine(virConnectPtr conn,
         }
     }
 
-    for (i = 0 ; i < def->ngraphics ; ++i) {
+    for (i = 0; i < def->ngraphics; ++i) {
         switch (def->graphics[i]->type) {
         case VIR_DOMAIN_GRAPHICS_TYPE_SDL:
             ++sdl;
@@ -7830,7 +7830,7 @@ qemuBuildCommandLine(virConnectPtr conn,
         goto error;
     }
 
-    for (i = 0 ; i < def->ngraphics ; ++i) {
+    for (i = 0; i < def->ngraphics; ++i) {
         if (qemuBuildGraphicsCommandLine(cfg, cmd, def, qemuCaps,
                                          def->graphics[i]) < 0)
             goto error;
@@ -7847,7 +7847,7 @@ qemuBuildCommandLine(virConnectPtr conn,
              (primaryVideoType == VIR_DOMAIN_VIDEO_TYPE_QXL &&
                  virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_QXL_VGA)))
            ) {
-            for (i = 0 ; i < def->nvideos ; i++) {
+            for (i = 0; i < def->nvideos; i++) {
                 char *str;
                 virCommandAddArg(cmd, "-device");
                 if (!(str = qemuBuildDeviceVideoStr(def->videos[i], qemuCaps, !i)))
@@ -7913,7 +7913,7 @@ qemuBuildCommandLine(virConnectPtr conn,
 
             if (def->nvideos > 1) {
                 if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE)) {
-                    for (i = 1 ; i < def->nvideos ; i++) {
+                    for (i = 1; i < def->nvideos; i++) {
                         char *str;
                         if (def->videos[i]->type != VIR_DOMAIN_VIDEO_TYPE_QXL) {
                             virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
@@ -7977,7 +7977,7 @@ qemuBuildCommandLine(virConnectPtr conn,
     /* Add sound hardware */
     if (def->nsounds) {
         if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE)) {
-            for (i = 0 ; i < def->nsounds ; i++) {
+            for (i = 0; i < def->nsounds; i++) {
                 virDomainSoundDefPtr sound = def->sounds[i];
                 char *str = NULL;
 
@@ -7997,7 +7997,7 @@ qemuBuildCommandLine(virConnectPtr conn,
                         char *codecstr = NULL;
                         int ii;
 
-                        for (ii = 0 ; ii < sound->ncodecs ; ii++) {
+                        for (ii = 0; ii < sound->ncodecs; ii++) {
                             virCommandAddArg(cmd, "-device");
                             if (!(codecstr = qemuBuildSoundCodecStr(sound, sound->codecs[ii], qemuCaps))) {
                                 goto error;
@@ -8030,7 +8030,7 @@ qemuBuildCommandLine(virConnectPtr conn,
             if (VIR_ALLOC_N(modstr, size+1) < 0)
                 goto no_memory;
 
-            for (i = 0 ; i < def->nsounds && size > 0 ; i++) {
+            for (i = 0; i < def->nsounds && size > 0; i++) {
                 virDomainSoundDefPtr sound = def->sounds[i];
                 const char *model = virDomainSoundModelTypeToString(sound->model);
                 if (!model) {
@@ -8097,7 +8097,7 @@ qemuBuildCommandLine(virConnectPtr conn,
     }
 
     /* Add redirected devices */
-    for (i = 0 ; i < def->nredirdevs ; i++) {
+    for (i = 0; i < def->nredirdevs; i++) {
         virDomainRedirdevDefPtr redirdev = def->redirdevs[i];
         char *devstr;
 
@@ -8123,7 +8123,7 @@ qemuBuildCommandLine(virConnectPtr conn,
 
 
     /* Add host passthrough hardware */
-    for (i = 0 ; i < def->nhostdevs ; i++) {
+    for (i = 0; i < def->nhostdevs; i++) {
         virDomainHostdevDefPtr hostdev = def->hostdevs[i];
         char *devstr;
 
@@ -8578,7 +8578,7 @@ static int qemuStringToArgvEnv(const char *args,
 
     /* Iterate over list of args, finding first arg not containing
      * the '=' character (eg, skip over env vars FOO=bar) */
-    for (envend = 0 ; ((envend < argcount) &&
+    for (envend = 0; ((envend < argcount) &&
                        (strchr(arglist[envend], '=') != NULL));
          envend++)
         ; /* nada */
@@ -8587,7 +8587,7 @@ static int qemuStringToArgvEnv(const char *args,
     if (envend > 0) {
         if (VIR_REALLOC_N(progenv, envend+1) < 0)
             goto no_memory;
-        for (i = 0 ; i < envend ; i++) {
+        for (i = 0; i < envend; i++) {
             progenv[i] = arglist[i];
             arglist[i] = NULL;
         }
@@ -8597,7 +8597,7 @@ static int qemuStringToArgvEnv(const char *args,
     /* Copy the list of argv */
     if (VIR_REALLOC_N(progargv, argcount-envend + 1) < 0)
         goto no_memory;
-    for (i = envend ; i < argcount ; i++)
+    for (i = envend; i < argcount; i++)
         progargv[i-envend] = arglist[i];
     progargv[i-envend] = NULL;
 
@@ -8609,10 +8609,10 @@ static int qemuStringToArgvEnv(const char *args,
     return 0;
 
 no_memory:
-    for (i = 0 ; progenv && progenv[i] ; i++)
+    for (i = 0; progenv && progenv[i]; i++)
         VIR_FREE(progenv[i]);
     VIR_FREE(progenv);
-    for (i = 0 ; i < argcount ; i++)
+    for (i = 0; i < argcount; i++)
         VIR_FREE(arglist[i]);
     VIR_FREE(arglist);
     virReportOOMError();
@@ -8629,7 +8629,7 @@ static const char *qemuFindEnv(const char **progenv,
     int i;
     int len = strlen(name);
 
-    for (i = 0 ; progenv && progenv[i] ; i++) {
+    for (i = 0; progenv && progenv[i]; i++) {
         if (STREQLEN(progenv[i], name, len) &&
             progenv[i][len] == '=')
             return progenv[i] + len + 1;
@@ -8735,7 +8735,7 @@ qemuParseKeywords(const char *str,
 no_memory:
     virReportOOMError();
 error:
-    for (i = 0 ; i < keywordCount ; i++) {
+    for (i = 0; i < keywordCount; i++) {
         VIR_FREE(keywords[i]);
         VIR_FREE(values[i]);
     }
@@ -8781,7 +8781,7 @@ qemuParseCommandLineDisk(virDomainXMLOptionPtr xmlopt,
     def->device = VIR_DOMAIN_DISK_DEVICE_DISK;
     def->type = VIR_DOMAIN_DISK_TYPE_FILE;
 
-    for (i = 0 ; i < nkeywords ; i++) {
+    for (i = 0; i < nkeywords; i++) {
         if (STREQ(keywords[i], "file")) {
             if (values[i] && STRNEQ(values[i], "")) {
                 def->src = values[i];
@@ -9061,7 +9061,7 @@ qemuParseCommandLineDisk(virDomainXMLOptionPtr xmlopt,
     }
 
 cleanup:
-    for (i = 0 ; i < nkeywords ; i++) {
+    for (i = 0; i < nkeywords; i++) {
         VIR_FREE(keywords[i]);
         VIR_FREE(values[i]);
     }
@@ -9084,7 +9084,7 @@ qemuFindNICForVLAN(int nnics,
                    int wantvlan)
 {
     int i;
-    for (i = 0 ; i < nnics ; i++) {
+    for (i = 0; i < nnics; i++) {
         int gotvlan;
         const char *tmp = strstr(nics[i], "vlan=");
         char *end;
@@ -9160,7 +9160,7 @@ qemuParseCommandLineNet(virDomainXMLOptionPtr xmlopt,
     else
         def->type = VIR_DOMAIN_NET_TYPE_ETHERNET;
 
-    for (i = 0 ; i < nkeywords ; i++) {
+    for (i = 0; i < nkeywords; i++) {
         if (STREQ(keywords[i], "vlan")) {
             if (virStrToLong_i(values[i], NULL, 10, &wantvlan) < 0) {
                 virReportError(VIR_ERR_INTERNAL_ERROR,
@@ -9200,7 +9200,7 @@ qemuParseCommandLineNet(virDomainXMLOptionPtr xmlopt,
         goto cleanup;
     }
 
-    for (i = 0 ; i < nkeywords ; i++) {
+    for (i = 0; i < nkeywords; i++) {
         VIR_FREE(keywords[i]);
         VIR_FREE(values[i]);
     }
@@ -9219,7 +9219,7 @@ qemuParseCommandLineNet(virDomainXMLOptionPtr xmlopt,
         nkeywords = 0;
     }
 
-    for (i = 0 ; i < nkeywords ; i++) {
+    for (i = 0; i < nkeywords; i++) {
         if (STREQ(keywords[i], "macaddr")) {
             genmac = 0;
             if (virMacAddrParse(values[i], &def->mac) < 0) {
@@ -9255,7 +9255,7 @@ qemuParseCommandLineNet(virDomainXMLOptionPtr xmlopt,
         virDomainNetGenerateMAC(xmlopt, &def->mac);
 
 cleanup:
-    for (i = 0 ; i < nkeywords ; i++) {
+    for (i = 0; i < nkeywords; i++) {
         VIR_FREE(keywords[i]);
         VIR_FREE(values[i]);
     }
@@ -9794,7 +9794,7 @@ static void
 qemuParseCommandLineBootDevs(virDomainDefPtr def, const char *str) {
     int n, b = 0;
 
-    for (n = 0 ; str[n] && b < VIR_DOMAIN_BOOT_LAST ; n++) {
+    for (n = 0; str[n] && b < VIR_DOMAIN_BOOT_LAST; n++) {
         if (str[n] == 'a')
             def->os.bootDevs[b++] = VIR_DOMAIN_BOOT_FLOPPY;
         else if (str[n] == 'c')
@@ -9916,7 +9916,7 @@ virDomainDefPtr qemuParseCommandLine(virCapsPtr qemuCaps,
 
     /* One initial loop to get list of NICs, so we
      * can correlate them later */
-    for (i = 1 ; progargv[i] ; i++) {
+    for (i = 1; progargv[i]; i++) {
         const char *arg = progargv[i];
         /* Make sure we have a single - for all options to
            simplify next logic */
@@ -9934,7 +9934,7 @@ virDomainDefPtr qemuParseCommandLine(virCapsPtr qemuCaps,
     }
 
     /* Now the real processing loop */
-    for (i = 1 ; progargv[i] ; i++) {
+    for (i = 1; progargv[i]; i++) {
         const char *arg = progargv[i];
         /* Make sure we have a single - for all options to
            simplify next logic */
@@ -10603,7 +10603,7 @@ virDomainDefPtr qemuParseCommandLine(virCapsPtr qemuCaps,
     if (def->ndisks > 0 && ceph_args) {
         char *hosts, *port, *saveptr = NULL, *token;
         virDomainDiskDefPtr first_rbd_disk = NULL;
-        for (i = 0 ; i < def->ndisks ; i++) {
+        for (i = 0; i < def->ndisks; i++) {
             if (def->disks[i]->type == VIR_DOMAIN_DISK_TYPE_NETWORK &&
                 def->disks[i]->protocol == VIR_DOMAIN_DISK_PROTOCOL_RBD) {
                 first_rbd_disk = def->disks[i];
@@ -10785,11 +10785,11 @@ virDomainDefPtr qemuParseCommandLineString(virCapsPtr qemuCaps,
                                pidfile, monConfig, monJSON);
 
 cleanup:
-    for (i = 0 ; progargv && progargv[i] ; i++)
+    for (i = 0; progargv && progargv[i]; i++)
         VIR_FREE(progargv[i]);
     VIR_FREE(progargv);
 
-    for (i = 0 ; progenv && progenv[i] ; i++)
+    for (i = 0; progenv && progenv[i]; i++)
         VIR_FREE(progenv[i]);
     VIR_FREE(progenv);
 
@@ -10847,7 +10847,7 @@ static int qemuParseProcFileStrings(int pid_value,
 
 cleanup:
     if (ret < 0) {
-        for (i = 0 ; str && str[i] ; i++)
+        for (i = 0; str && str[i]; i++)
             VIR_FREE(str[i]);
         VIR_FREE(str);
     }
@@ -10897,10 +10897,10 @@ virDomainDefPtr qemuParseCommandLinePid(virCapsPtr qemuCaps,
 
 cleanup:
     VIR_FREE(exepath);
-    for (i = 0 ; progargv && progargv[i] ; i++)
+    for (i = 0; progargv && progargv[i]; i++)
         VIR_FREE(progargv[i]);
     VIR_FREE(progargv);
-    for (i = 0 ; progenv && progenv[i] ; i++)
+    for (i = 0; progenv && progenv[i]; i++)
         VIR_FREE(progenv[i]);
     VIR_FREE(progenv);
     return def;
diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
index 41fe0b9..06ae29b 100644
--- a/src/qemu/qemu_conf.c
+++ b/src/qemu/qemu_conf.c
@@ -922,13 +922,13 @@ virQEMUCloseCallbacksRun(virQEMUCloseCallbacksPtr closeCallbacks,
     if (!list)
         return;
 
-    for (i = 0 ; i < list->nentries ; i++) {
+    for (i = 0; i < list->nentries; i++) {
         virHashRemoveEntry(closeCallbacks->list,
                            list->entries[i].uuid);
     }
     virObjectUnlock(closeCallbacks);
 
-    for (i = 0 ; i < list->nentries ; i++) {
+    for (i = 0; i < list->nentries; i++) {
         virDomainObjPtr vm;
 
         if (!(vm = virDomainObjListFindByUUID(driver->domains,
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index d7c2975..11c1c2c 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -291,7 +291,7 @@ qemuDomainObjPrivateXMLFormat(virBufferPtr buf, void *data)
     if (priv->nvcpupids) {
         int i;
         virBufferAddLit(buf, "  <vcpus>\n");
-        for (i = 0 ; i < priv->nvcpupids ; i++) {
+        for (i = 0; i < priv->nvcpupids; i++) {
             virBufferAsprintf(buf, "    <vcpu pid='%d'/>\n", priv->vcpupids[i]);
         }
         virBufferAddLit(buf, "  </vcpus>\n");
@@ -300,7 +300,7 @@ qemuDomainObjPrivateXMLFormat(virBufferPtr buf, void *data)
     if (priv->qemuCaps) {
         int i;
         virBufferAddLit(buf, "  <qemuCaps>\n");
-        for (i = 0 ; i < QEMU_CAPS_LAST ; i++) {
+        for (i = 0; i < QEMU_CAPS_LAST; i++) {
             if (virQEMUCapsGet(priv->qemuCaps, i)) {
                 virBufferAsprintf(buf, "    <flag name='%s'/>\n",
                                   virQEMUCapsTypeToString(i));
@@ -392,7 +392,7 @@ qemuDomainObjPrivateXMLParse(xmlXPathContextPtr ctxt, void *data)
             goto error;
         }
 
-        for (i = 0 ; i < n ; i++) {
+        for (i = 0; i < n; i++) {
             char *pidstr = virXMLPropString(nodes[i], "pid");
             if (!pidstr)
                 goto error;
@@ -415,7 +415,7 @@ qemuDomainObjPrivateXMLParse(xmlXPathContextPtr ctxt, void *data)
         if (!(qemuCaps = virQEMUCapsNew()))
             goto error;
 
-        for (i = 0 ; i < n ; i++) {
+        for (i = 0; i < n; i++) {
             char *str = virXMLPropString(nodes[i], "name");
             if (str) {
                 int flag = virQEMUCapsTypeFromString(str);
@@ -1502,10 +1502,10 @@ void qemuDomainObjCheckTaint(virQEMUDriverPtr driver,
     if (obj->def->cpu && obj->def->cpu->mode == VIR_CPU_MODE_HOST_PASSTHROUGH)
         qemuDomainObjTaint(driver, obj, VIR_DOMAIN_TAINT_HOST_CPU, logFD);
 
-    for (i = 0 ; i < obj->def->ndisks ; i++)
+    for (i = 0; i < obj->def->ndisks; i++)
         qemuDomainObjCheckDiskTaint(driver, obj, obj->def->disks[i], logFD);
 
-    for (i = 0 ; i < obj->def->nnets ; i++)
+    for (i = 0; i < obj->def->nnets; i++)
         qemuDomainObjCheckNetTaint(driver, obj, obj->def->nets[i], logFD);
 
     virObjectUnref(cfg);
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 0665131..d64c5a0 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -911,7 +911,7 @@ qemuStateStop(void) {
     /* First we pause all VMs to make them stop dirtying
        pages, etc. We remember if any VMs were paused so
        we can restore that on resume. */
-    for (i = 0 ; i < numDomains ; i++) {
+    for (i = 0; i < numDomains; i++) {
         flags[i] = VIR_DOMAIN_SAVE_RUNNING;
         if (virDomainGetState(domains[i], &state, NULL, 0) == 0) {
             if (state == VIR_DOMAIN_PAUSED) {
@@ -923,12 +923,12 @@ qemuStateStop(void) {
 
     ret = 0;
     /* Then we save the VMs to disk */
-    for (i = 0 ; i < numDomains ; i++)
+    for (i = 0; i < numDomains; i++)
         if (virDomainManagedSave(domains[i], flags[i]) < 0)
             ret = -1;
 
  cleanup:
-    for (i = 0 ; i < numDomains ; i++)
+    for (i = 0; i < numDomains; i++)
         virDomainFree(domains[i]);
     VIR_FREE(domains);
     VIR_FREE(flags);
@@ -3535,7 +3535,7 @@ static int qemuDomainHotplugVcpus(virQEMUDriverPtr driver,
      * in reverse order to onlining, so any partial fail leaves us in a
      * reasonably sensible state */
     if (nvcpus > vcpus) {
-        for (i = vcpus ; i < nvcpus ; i++) {
+        for (i = vcpus; i < nvcpus; i++) {
             /* Online new CPU */
             rc = qemuMonitorSetCPU(priv->mon, i, 1);
             if (rc == 0)
@@ -3546,7 +3546,7 @@ static int qemuDomainHotplugVcpus(virQEMUDriverPtr driver,
             vcpus++;
         }
     } else {
-        for (i = vcpus - 1 ; i >= nvcpus ; i--) {
+        for (i = vcpus - 1; i >= nvcpus; i--) {
             /* Offline old CPU */
             rc = qemuMonitorSetCPU(priv->mon, i, 0);
             if (rc == 0)
@@ -4345,7 +4345,7 @@ qemuDomainGetVcpus(virDomainPtr dom,
     if (maxinfo >= 1) {
         if (info != NULL) {
             memset(info, 0, sizeof(*info) * maxinfo);
-            for (i = 0 ; i < maxinfo ; i++) {
+            for (i = 0; i < maxinfo; i++) {
                 info[i].number = i;
                 info[i].state = VIR_VCPU_RUNNING;
 
@@ -4365,7 +4365,7 @@ qemuDomainGetVcpus(virDomainPtr dom,
         if (cpumaps != NULL) {
             memset(cpumaps, 0, maplen * maxinfo);
             if (priv->vcpupids != NULL) {
-                for (v = 0 ; v < maxinfo ; v++) {
+                for (v = 0; v < maxinfo; v++) {
                     unsigned char *cpumap = VIR_GET_CPUMAP(cpumaps, maplen, v);
                     virBitmapPtr map = NULL;
                     unsigned char *tmpmap = NULL;
@@ -5230,7 +5230,7 @@ static char *qemuConnectDomainXMLToNative(virConnectPtr conn,
      * directly. We convert those configs into generic 'ethernet'
      * config and assume the user has suitable 'ifup-qemu' scripts
      */
-    for (i = 0 ; i < def->nnets ; i++) {
+    for (i = 0; i < def->nnets; i++) {
         virDomainNetDefPtr net = def->nets[i];
         int bootIndex = net->info.bootIndex;
         char *model = net->model;
@@ -5309,7 +5309,7 @@ static char *qemuConnectDomainXMLToNative(virConnectPtr conn,
         goto cleanup;
 
     /* do fake auto-alloc of graphics ports, if such config is used */
-    for (i = 0 ; i < def->ngraphics; ++i) {
+    for (i = 0; i < def->ngraphics; ++i) {
         virDomainGraphicsDefPtr graphics = def->graphics[i];
         if (graphics->type == VIR_DOMAIN_GRAPHICS_TYPE_VNC &&
             !graphics->data.vnc.socket && graphics->data.vnc.autoport) {
@@ -5322,7 +5322,7 @@ static char *qemuConnectDomainXMLToNative(virConnectPtr conn,
 
             if (graphics->data.spice.autoport) {
                 /* check if tlsPort or port need allocation */
-                for (j = 0 ; j < VIR_DOMAIN_GRAPHICS_SPICE_CHANNEL_LAST ; j++) {
+                for (j = 0; j < VIR_DOMAIN_GRAPHICS_SPICE_CHANNEL_LAST; j++) {
                     switch (graphics->data.spice.channels[j]) {
                     case VIR_DOMAIN_GRAPHICS_SPICE_CHANNEL_MODE_SECURE:
                         needTLSPort = true;
@@ -8766,7 +8766,7 @@ qemuDomainInterfaceStats(virDomainPtr dom,
     }
 
     /* Check the path is one of the domain's network interfaces. */
-    for (i = 0 ; i < vm->def->nnets ; i++) {
+    for (i = 0; i < vm->def->nnets; i++) {
         if (vm->def->nets[i]->ifname &&
             STREQ(vm->def->nets[i]->ifname, path)) {
             ret = 0;
@@ -13019,16 +13019,16 @@ qemuDomainOpenConsole(virDomainPtr dom,
     priv = vm->privateData;
 
     if (dev_name) {
-        for (i = 0 ; !chr && i < vm->def->nconsoles ; i++) {
+        for (i = 0; !chr && i < vm->def->nconsoles; i++) {
             if (vm->def->consoles[i]->info.alias &&
                 STREQ(dev_name, vm->def->consoles[i]->info.alias))
                 chr = vm->def->consoles[i];
         }
-        for (i = 0 ; !chr && i < vm->def->nserials ; i++) {
+        for (i = 0; !chr && i < vm->def->nserials; i++) {
             if (STREQ(dev_name, vm->def->serials[i]->info.alias))
                 chr = vm->def->serials[i];
         }
-        for (i = 0 ; !chr && i < vm->def->nparallels ; i++) {
+        for (i = 0; !chr && i < vm->def->nparallels; i++) {
             if (STREQ(dev_name, vm->def->parallels[i]->info.alias))
                 chr = vm->def->parallels[i];
         }
@@ -13097,7 +13097,7 @@ qemuDomainOpenChannel(virDomainPtr dom,
     priv = vm->privateData;
 
     if (name) {
-        for (i = 0 ; !chr && i < vm->def->nchannels ; i++) {
+        for (i = 0; !chr && i < vm->def->nchannels; i++) {
             if (STREQ(name, vm->def->channels[i]->info.alias))
                 chr = vm->def->channels[i];
 
diff --git a/src/qemu/qemu_hostdev.c b/src/qemu/qemu_hostdev.c
index 67cb491..48750c3 100644
--- a/src/qemu/qemu_hostdev.c
+++ b/src/qemu/qemu_hostdev.c
@@ -43,7 +43,7 @@ qemuGetPciHostDeviceList(virDomainHostdevDefPtr *hostdevs, int nhostdevs)
     if (!(list = virPCIDeviceListNew()))
         return NULL;
 
-    for (i = 0 ; i < nhostdevs ; i++) {
+    for (i = 0; i < nhostdevs; i++) {
         virDomainHostdevDefPtr hostdev = hostdevs[i];
         virPCIDevicePtr dev;
 
@@ -93,7 +93,7 @@ qemuGetActivePciHostDeviceList(virQEMUDriverPtr driver,
     if (!(list = virPCIDeviceListNew()))
         return NULL;
 
-    for (i = 0 ; i < nhostdevs ; i++) {
+    for (i = 0; i < nhostdevs; i++) {
         virDomainHostdevDefPtr hostdev = hostdevs[i];
         virPCIDevicePtr dev;
         virPCIDevicePtr activeDev;
@@ -822,7 +822,7 @@ qemuPrepareHostUSBDevices(virQEMUDriverPtr driver,
 
     /* Loop 1: build temporary list
      */
-    for (i = 0 ; i < nhostdevs ; i++) {
+    for (i = 0; i < nhostdevs; i++) {
         virDomainHostdevDefPtr hostdev = hostdevs[i];
         bool required = true;
         virUSBDevicePtr usb;
@@ -904,7 +904,7 @@ qemuPrepareHostdevSCSIDevices(virQEMUDriverPtr driver,
         goto cleanup;
 
     /* Loop 2: build temporary list */
-    for (i = 0 ; i < nhostdevs ; i++) {
+    for (i = 0; i < nhostdevs; i++) {
         virDomainHostdevDefPtr hostdev = hostdevs[i];
         virSCSIDevicePtr scsi;
 
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index 77d9f4f..b68c7e7 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -230,7 +230,7 @@ int qemuDomainAttachVirtioDiskDevice(virConnectPtr conn,
             disk->info.type = VIR_DOMAIN_DEVICE_ADDRESS_TYPE_VIRTIO_S390;
     }
 
-    for (i = 0 ; i < vm->def->ndisks ; i++) {
+    for (i = 0; i < vm->def->ndisks; i++) {
         if (STREQ(vm->def->disks[i]->dst, disk->dst)) {
             virReportError(VIR_ERR_OPERATION_FAILED,
                            _("target %s already exists"), disk->dst);
@@ -421,7 +421,7 @@ qemuDomainFindOrCreateSCSIDiskController(virQEMUDriverPtr driver,
     int i;
     virDomainControllerDefPtr cont;
 
-    for (i = 0 ; i < vm->def->ncontrollers ; i++) {
+    for (i = 0; i < vm->def->ncontrollers; i++) {
         cont = vm->def->controllers[i];
 
         if (cont->type != VIR_DOMAIN_CONTROLLER_TYPE_SCSI)
@@ -473,7 +473,7 @@ int qemuDomainAttachSCSIDisk(virConnectPtr conn,
     int ret = -1;
     virQEMUDriverConfigPtr cfg = virQEMUDriverGetConfig(driver);
 
-    for (i = 0 ; i < vm->def->ndisks ; i++) {
+    for (i = 0; i < vm->def->ndisks; i++) {
         if (STREQ(vm->def->disks[i]->dst, disk->dst)) {
             virReportError(VIR_ERR_OPERATION_FAILED,
                            _("target %s already exists"), disk->dst);
@@ -510,7 +510,7 @@ int qemuDomainAttachSCSIDisk(virConnectPtr conn,
     if (!(drivestr = qemuBuildDriveStr(conn, disk, false, priv->qemuCaps)))
         goto error;
 
-    for (i = 0 ; i <= disk->info.addr.drive.controller ; i++) {
+    for (i = 0; i <= disk->info.addr.drive.controller; i++) {
         cont = qemuDomainFindOrCreateSCSIDiskController(driver, vm, i);
         if (!cont)
             goto error;
@@ -596,7 +596,7 @@ int qemuDomainAttachUsbMassstorageDevice(virConnectPtr conn,
     char *devstr = NULL;
     virQEMUDriverConfigPtr cfg = virQEMUDriverGetConfig(driver);
 
-    for (i = 0 ; i < vm->def->ndisks ; i++) {
+    for (i = 0; i < vm->def->ndisks; i++) {
         if (STREQ(vm->def->disks[i]->dst, disk->dst)) {
             virReportError(VIR_ERR_OPERATION_FAILED,
                            _("target %s already exists"), disk->dst);
@@ -1892,7 +1892,7 @@ static virDomainGraphicsDefPtr qemuDomainFindGraphics(virDomainObjPtr vm,
 {
     int i;
 
-    for (i = 0 ; i < vm->def->ngraphics ; i++) {
+    for (i = 0; i < vm->def->ngraphics; i++) {
         if (vm->def->graphics[i]->type == dev->type)
             return vm->def->graphics[i];
     }
@@ -2056,7 +2056,7 @@ static inline int qemuFindDisk(virDomainDefPtr def, const char *dst)
 {
     int i;
 
-    for (i = 0 ; i < def->ndisks ; i++) {
+    for (i = 0; i < def->ndisks; i++) {
         if (STREQ(def->disks[i]->dst, dst)) {
             return i;
         }
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index e10127d..68ce478 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -610,7 +610,7 @@ qemuMigrationCookieXMLFormat(virQEMUDriverPtr driver,
     virBufferEscapeString(buf, "  <hostname>%s</hostname>\n", mig->localHostname);
     virBufferAsprintf(buf, "  <hostuuid>%s</hostuuid>\n", hostuuidstr);
 
-    for (i = 0 ; i < QEMU_MIGRATION_COOKIE_FLAG_LAST ; i++) {
+    for (i = 0; i < QEMU_MIGRATION_COOKIE_FLAG_LAST; i++) {
         if (mig->flagsMandatory & (1 << i))
             virBufferAsprintf(buf, "  <feature name='%s'/>\n",
                               qemuMigrationCookieFlagTypeToString(i));
@@ -866,7 +866,7 @@ qemuMigrationCookieXMLParse(qemuMigrationCookiePtr mig,
     if ((n = virXPathNodeSet("./feature", ctxt, &nodes)) < 0)
         goto error;
 
-    for (i = 0 ; i < n ; i++) {
+    for (i = 0; i < n; i++) {
         int val;
         char *str = virXMLPropString(nodes[i], "name");
         if (!str) {
@@ -1467,7 +1467,7 @@ qemuMigrationIsSafe(virDomainDefPtr def)
 {
     int i;
 
-    for (i = 0 ; i < def->ndisks ; i++) {
+    for (i = 0; i < def->ndisks; i++) {
         virDomainDiskDefPtr disk = def->disks[i];
 
         /* Our code elsewhere guarantees shared disks are either readonly (in
diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c
index f6d8ef4..3897e63 100644
--- a/src/qemu/qemu_monitor.c
+++ b/src/qemu/qemu_monitor.c
@@ -225,7 +225,7 @@ static char * qemuMonitorEscapeNonPrintable(const char *text)
 {
     int i;
     virBuffer buf = VIR_BUFFER_INITIALIZER;
-    for (i = 0 ; text[i] != '\0' ; i++) {
+    for (i = 0; text[i] != '\0'; i++) {
         if (c_isprint(text[i]) ||
             text[i] == '\n' ||
             (text[i] == '\r' && text[i+1] == '\n'))
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index d95198b..1719e0e 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -515,7 +515,7 @@ static void
 qemuFreeKeywords(int nkeywords, char **keywords, char **values)
 {
     int i;
-    for (i = 0 ; i < nkeywords ; i++) {
+    for (i = 0; i < nkeywords; i++) {
         VIR_FREE(keywords[i]);
         VIR_FREE(values[i]);
     }
@@ -540,7 +540,7 @@ qemuMonitorJSONKeywordStringToJSON(const char *str, const char *firstkeyword)
     if (nkeywords < 0)
         goto error;
 
-    for (i = 0 ; i < nkeywords ; i++) {
+    for (i = 0; i < nkeywords; i++) {
         if (values[i] == NULL) {
             if (i != 0) {
                 virReportError(VIR_ERR_INTERNAL_ERROR,
@@ -1208,7 +1208,7 @@ qemuMonitorJSONExtractCPUInfo(virJSONValuePtr reply,
         goto cleanup;
     }
 
-    for (i = 0 ; i < ncpus ; i++) {
+    for (i = 0; i < ncpus; i++) {
         virJSONValuePtr entry = virJSONValueArrayGet(data, i);
         int thread;
         if (!entry) {
@@ -1643,7 +1643,7 @@ int qemuMonitorJSONGetBlockStatsInfo(qemuMonitorPtr mon,
         goto cleanup;
     }
 
-    for (i = 0 ; i < virJSONValueArraySize(devices) ; i++) {
+    for (i = 0; i < virJSONValueArraySize(devices); i++) {
         virJSONValuePtr dev = virJSONValueArrayGet(devices, i);
         virJSONValuePtr stats;
         const char *thisdev;
@@ -1797,7 +1797,7 @@ int qemuMonitorJSONGetBlockStatsParamsNumber(qemuMonitorPtr mon,
         goto cleanup;
     }
 
-    for (i = 0 ; i < stats->data.object.npairs; i++) {
+    for (i = 0; i < stats->data.object.npairs; i++) {
         const char *key = stats->data.object.pairs[i].key;
 
         if (STREQ(key, "rd_bytes") ||
@@ -1857,7 +1857,7 @@ int qemuMonitorJSONGetBlockExtent(qemuMonitorPtr mon,
         goto cleanup;
     }
 
-    for (i = 0 ; i < virJSONValueArraySize(devices) ; i++) {
+    for (i = 0; i < virJSONValueArraySize(devices); i++) {
         virJSONValuePtr dev = virJSONValueArrayGet(devices, i);
         virJSONValuePtr stats;
         virJSONValuePtr parent;
@@ -2923,7 +2923,7 @@ static int qemuMonitorJSONExtractPtyPaths(virJSONValuePtr reply,
         goto cleanup;
     }
 
-    for (i = 0 ; i < virJSONValueArraySize(data) ; i++) {
+    for (i = 0; i < virJSONValueArraySize(data); i++) {
         virJSONValuePtr entry = virJSONValueArrayGet(data, i);
         const char *type;
         const char *id;
@@ -3984,7 +3984,7 @@ int qemuMonitorJSONGetMachines(qemuMonitorPtr mon,
         goto cleanup;
     }
 
-    for (i = 0 ; i < n ; i++) {
+    for (i = 0; i < n; i++) {
         virJSONValuePtr child = virJSONValueArrayGet(data, i);
         const char *tmp;
         qemuMonitorMachineInfoPtr info;
@@ -4032,7 +4032,7 @@ int qemuMonitorJSONGetMachines(qemuMonitorPtr mon,
 
 cleanup:
     if (ret < 0 && infolist) {
-        for (i = 0 ; i < n ; i++)
+        for (i = 0; i < n; i++)
             qemuMonitorMachineInfoFree(infolist[i]);
         VIR_FREE(infolist);
     }
@@ -4098,7 +4098,7 @@ int qemuMonitorJSONGetCPUDefinitions(qemuMonitorPtr mon,
         goto cleanup;
     }
 
-    for (i = 0 ; i < n ; i++) {
+    for (i = 0; i < n; i++) {
         virJSONValuePtr child = virJSONValueArrayGet(data, i);
         const char *tmp;
 
@@ -4170,7 +4170,7 @@ int qemuMonitorJSONGetCommands(qemuMonitorPtr mon,
         goto cleanup;
     }
 
-    for (i = 0 ; i < n ; i++) {
+    for (i = 0; i < n; i++) {
         virJSONValuePtr child = virJSONValueArrayGet(data, i);
         const char *tmp;
 
@@ -4247,7 +4247,7 @@ int qemuMonitorJSONGetEvents(qemuMonitorPtr mon,
         goto cleanup;
     }
 
-    for (i = 0 ; i < n ; i++) {
+    for (i = 0; i < n; i++) {
         virJSONValuePtr child = virJSONValueArrayGet(data, i);
         const char *tmp;
 
@@ -4328,7 +4328,7 @@ qemuMonitorJSONGetCommandLineOptionParameters(qemuMonitorPtr mon,
         goto cleanup;
     }
 
-    for (i = 0 ; i < n ; i++) {
+    for (i = 0; i < n; i++) {
         virJSONValuePtr child = virJSONValueArrayGet(array, i);
         const char *tmp;
 
@@ -4363,7 +4363,7 @@ qemuMonitorJSONGetCommandLineOptionParameters(qemuMonitorPtr mon,
         goto cleanup;
     }
 
-    for (i = 0 ; i < n ; i++) {
+    for (i = 0; i < n; i++) {
         virJSONValuePtr child = virJSONValueArrayGet(data, i);
         const char *tmp;
 
@@ -4490,7 +4490,7 @@ int qemuMonitorJSONGetObjectTypes(qemuMonitorPtr mon,
         goto cleanup;
     }
 
-    for (i = 0 ; i < n ; i++) {
+    for (i = 0; i < n; i++) {
         virJSONValuePtr child = virJSONValueArrayGet(data, i);
         const char *tmp;
 
@@ -4570,7 +4570,7 @@ int qemuMonitorJSONGetObjectProps(qemuMonitorPtr mon,
         goto cleanup;
     }
 
-    for (i = 0 ; i < n ; i++) {
+    for (i = 0; i < n; i++) {
         virJSONValuePtr child = virJSONValueArrayGet(data, i);
         const char *tmp;
 
@@ -4917,7 +4917,7 @@ qemuMonitorJSONGetStringArray(qemuMonitorPtr mon, const char *qmpCmd,
         goto cleanup;
     }
 
-    for (i = 0 ; i < n ; i++) {
+    for (i = 0; i < n; i++) {
         virJSONValuePtr child = virJSONValueArrayGet(data, i);
         const char *tmp;
 
diff --git a/src/qemu/qemu_monitor_text.c b/src/qemu/qemu_monitor_text.c
index 696961b..88e3aaf 100644
--- a/src/qemu/qemu_monitor_text.c
+++ b/src/qemu/qemu_monitor_text.c
@@ -168,7 +168,7 @@ int qemuMonitorTextIOProcess(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
 
                     /* Blank out the password prompt so we don't re-trigger
                      * if we have to go back to sleep for more I/O */
-                    for (i = 0 ; i < strlen(PASSWORD_PROMPT) ; i++)
+                    for (i = 0; i < strlen(PASSWORD_PROMPT); i++)
                         start[i] = ' ';
 
                     /* Handled, so skip forward over password prompt */
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index a68601b..048105f 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -199,7 +199,7 @@ qemuFindAgentConfig(virDomainDefPtr def)
     virDomainChrSourceDefPtr config = NULL;
     int i;
 
-    for (i = 0 ; i < def->nchannels ; i++) {
+    for (i = 0; i < def->nchannels; i++) {
         virDomainChrDefPtr channel = def->channels[i];
 
         if (channel->targetType != VIR_DOMAIN_CHR_CHANNEL_TARGET_TYPE_VIRTIO)
@@ -1052,7 +1052,7 @@ no_memory:
         VIR_FREE(remoteAddr);
     }
     if (subject) {
-        for (i = 0 ; i < subject->nidentity ; i++) {
+        for (i = 0; i < subject->nidentity; i++) {
             VIR_FREE(subject->identities[i].type);
             VIR_FREE(subject->identities[i].name);
         }
@@ -1511,7 +1511,7 @@ qemuProcessLookupPTYs(virDomainChrDefPtr *devices,
     int i;
     const char *prefix = chardevfmt ? "char" : "";
 
-    for (i = 0 ; i < count ; i++) {
+    for (i = 0; i < count; i++) {
         virDomainChrDefPtr chr = devices[i];
         if (chr->source.type == VIR_DOMAIN_CHR_TYPE_PTY) {
             char id[32];
@@ -1606,7 +1606,7 @@ qemuProcessFindCharDevicePTYs(virDomainObjPtr vm,
        device args. This code must match that ordering.... */
 
     /* first comes the serial devices */
-    for (i = 0 ; i < vm->def->nserials ; i++) {
+    for (i = 0; i < vm->def->nserials; i++) {
         virDomainChrDefPtr chr = vm->def->serials[i];
         if (chr->source.type == VIR_DOMAIN_CHR_TYPE_PTY) {
             if ((ret = qemuProcessExtractTTYPath(output, &offset,
@@ -1616,7 +1616,7 @@ qemuProcessFindCharDevicePTYs(virDomainObjPtr vm,
     }
 
     /* then the parallel devices */
-    for (i = 0 ; i < vm->def->nparallels ; i++) {
+    for (i = 0; i < vm->def->nparallels; i++) {
         virDomainChrDefPtr chr = vm->def->parallels[i];
         if (chr->source.type == VIR_DOMAIN_CHR_TYPE_PTY) {
             if ((ret = qemuProcessExtractTTYPath(output, &offset,
@@ -1626,7 +1626,7 @@ qemuProcessFindCharDevicePTYs(virDomainObjPtr vm,
     }
 
     /* then the channel devices */
-    for (i = 0 ; i < vm->def->nchannels ; i++) {
+    for (i = 0; i < vm->def->nchannels; i++) {
         virDomainChrDefPtr chr = vm->def->channels[i];
         if (chr->source.type == VIR_DOMAIN_CHR_TYPE_PTY) {
             if ((ret = qemuProcessExtractTTYPath(output, &offset,
@@ -1635,7 +1635,7 @@ qemuProcessFindCharDevicePTYs(virDomainObjPtr vm,
         }
     }
 
-    for (i = 0 ; i < vm->def->nconsoles ; i++) {
+    for (i = 0; i < vm->def->nconsoles; i++) {
         virDomainChrDefPtr chr = vm->def->consoles[i];
         /* For historical reasons, console[0] can be just an alias
          * for serial[0]; That's why we need to update it as well */
@@ -1989,7 +1989,7 @@ qemuProcessInitPasswords(virConnectPtr conn,
     virQEMUDriverConfigPtr cfg = virQEMUDriverGetConfig(driver);
     int i;
 
-    for (i = 0 ; i < vm->def->ngraphics; ++i) {
+    for (i = 0; i < vm->def->ngraphics; ++i) {
         virDomainGraphicsDefPtr graphics = vm->def->graphics[i];
         if (graphics->type == VIR_DOMAIN_GRAPHICS_TYPE_VNC) {
             ret = qemuDomainChangeGraphicsPasswords(driver, vm,
@@ -2008,7 +2008,7 @@ qemuProcessInitPasswords(virConnectPtr conn,
         goto cleanup;
 
     if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_DEVICE)) {
-        for (i = 0 ; i < vm->def->ndisks ; i++) {
+        for (i = 0; i < vm->def->ndisks; i++) {
             char *secret;
             size_t secretLen;
             const char *alias;
@@ -2082,7 +2082,7 @@ qemuProcessAssignNextPCIAddress(virDomainDeviceInfo *info,
 
     VIR_DEBUG("Look for %x:%x out of %d", vendor, product, naddrs);
 
-    for (i = 0 ; (i < naddrs) && !found; i++) {
+    for (i = 0; (i < naddrs) && !found; i++) {
         VIR_DEBUG("Maybe %x:%x", addrs[i].vendor, addrs[i].product);
         if (addrs[i].vendor == vendor &&
             addrs[i].product == product) {
@@ -2299,7 +2299,7 @@ qemuProcessDetectPCIAddresses(virDomainObjPtr vm,
      * actual device data structure instead ?
      */
 
-    for (i = 0 ; i < vm->def->ndisks ; i++) {
+    for (i = 0; i < vm->def->ndisks; i++) {
         if (qemuProcessGetPCIDiskVendorProduct(vm->def->disks[i], &vendor, &product) < 0)
             continue;
 
@@ -2313,7 +2313,7 @@ qemuProcessDetectPCIAddresses(virDomainObjPtr vm,
         }
     }
 
-    for (i = 0 ; i < vm->def->nnets ; i++) {
+    for (i = 0; i < vm->def->nnets; i++) {
         if (qemuProcessGetPCINetVendorProduct(vm->def->nets[i], &vendor, &product) < 0)
             continue;
 
@@ -2327,7 +2327,7 @@ qemuProcessDetectPCIAddresses(virDomainObjPtr vm,
         }
     }
 
-    for (i = 0 ; i < vm->def->ncontrollers ; i++) {
+    for (i = 0; i < vm->def->ncontrollers; i++) {
         if (qemuProcessGetPCIControllerVendorProduct(vm->def->controllers[i], &vendor, &product) < 0)
             continue;
 
@@ -2341,7 +2341,7 @@ qemuProcessDetectPCIAddresses(virDomainObjPtr vm,
         }
     }
 
-    for (i = 0 ; i < vm->def->nvideos ; i++) {
+    for (i = 0; i < vm->def->nvideos; i++) {
         if (qemuProcessGetPCIVideoVendorProduct(vm->def->videos[i], &vendor, &product) < 0)
             continue;
 
@@ -2355,7 +2355,7 @@ qemuProcessDetectPCIAddresses(virDomainObjPtr vm,
         }
     }
 
-    for (i = 0 ; i < vm->def->nsounds ; i++) {
+    for (i = 0; i < vm->def->nsounds; i++) {
         if (qemuProcessGetPCISoundVendorProduct(vm->def->sounds[i], &vendor, &product) < 0)
             continue;
 
@@ -2611,7 +2611,7 @@ qemuProcessNotifyNets(virDomainDefPtr def)
 {
     int ii;
 
-    for (ii = 0 ; ii < def->nnets ; ii++) {
+    for (ii = 0; ii < def->nnets; ii++) {
         virDomainNetDefPtr net = def->nets[ii];
         if (networkNotifyActualDevice(net) < 0)
             return -1;
@@ -2629,7 +2629,7 @@ qemuProcessFiltersInstantiate(virConnectPtr conn,
     if (!conn)
         return 1;
 
-    for (i = 0 ; i < def->nnets ; i++) {
+    for (i = 0; i < def->nnets; i++) {
         virDomainNetDefPtr net = def->nets[i];
         if ((net->filter) && (net->ifname)) {
            if (virDomainConfNWFilterInstantiate(conn, def->uuid, net) < 0) {
@@ -3242,7 +3242,7 @@ qemuProcessSPICEAllocatePorts(virQEMUDriverPtr driver,
 
     if (graphics->data.spice.autoport) {
         /* check if tlsPort or port need allocation */
-        for (i = 0 ; i < VIR_DOMAIN_GRAPHICS_SPICE_CHANNEL_LAST ; i++) {
+        for (i = 0; i < VIR_DOMAIN_GRAPHICS_SPICE_CHANNEL_LAST; i++) {
             switch (graphics->data.spice.channels[i]) {
             case VIR_DOMAIN_GRAPHICS_SPICE_CHANNEL_MODE_SECURE:
                 needTLSPort = true;
@@ -3458,7 +3458,7 @@ int qemuProcessStart(virConnectPtr conn,
     VIR_DEBUG("Ensuring no historical cgroup is lying around");
     qemuRemoveCgroup(vm);
 
-    for (i = 0 ; i < vm->def->ngraphics; ++i) {
+    for (i = 0; i < vm->def->ngraphics; ++i) {
         virDomainGraphicsDefPtr graphics = vm->def->graphics[i];
         if (graphics->type == VIR_DOMAIN_GRAPHICS_TYPE_VNC) {
             if (qemuProcessVNCAllocatePorts(driver, graphics) < 0)
@@ -3525,7 +3525,7 @@ int qemuProcessStart(virConnectPtr conn,
                                     flags & VIR_QEMU_PROCESS_START_COLD) < 0)
         goto cleanup;
 
-    for (i = 0; i < vm->def->ndisks ; i++) {
+    for (i = 0; i < vm->def->ndisks; i++) {
         if (qemuDomainDetermineDiskChain(driver, vm->def->disks[i],
                                          false) < 0)
             goto cleanup;
@@ -4013,7 +4013,7 @@ void qemuProcessStop(virQEMUDriverPtr driver,
 
     if (cfg->macFilter) {
         def = vm->def;
-        for (i = 0 ; i < def->nnets ; i++) {
+        for (i = 0; i < def->nnets; i++) {
             virDomainNetDefPtr net = def->nets[i];
             if (net->ifname == NULL)
                 continue;
@@ -4146,7 +4146,7 @@ retry:
     /* Remove VNC and Spice ports from port reservation bitmap, but only if
        they were reserved by the driver (autoport=yes)
     */
-    for (i = 0 ; i < vm->def->ngraphics; ++i) {
+    for (i = 0; i < vm->def->ngraphics; ++i) {
         virDomainGraphicsDefPtr graphics = vm->def->graphics[i];
         if (graphics->type == VIR_DOMAIN_GRAPHICS_TYPE_VNC) {
             if (graphics->data.vnc.autoport) {
-- 
1.8.1.4


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