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

[libvirt] [PATCH 03/31] src/conf: Remove the whitespace before '; '



---
 src/conf/capabilities.c     |  50 +++++-----
 src/conf/cpu_conf.c         |  14 +--
 src/conf/domain_audit.c     |  10 +-
 src/conf/domain_conf.c      | 230 ++++++++++++++++++++++----------------------
 src/conf/domain_event.c     |  32 +++---
 src/conf/interface_conf.c   |   8 +-
 src/conf/network_conf.c     |  28 +++---
 src/conf/node_device_conf.c |  12 +--
 src/conf/nwfilter_conf.c    |   8 +-
 src/conf/storage_conf.c     |   8 +-
 10 files changed, 200 insertions(+), 200 deletions(-)

diff --git a/src/conf/capabilities.c b/src/conf/capabilities.c
index 5340b63..e997969 100644
--- a/src/conf/capabilities.c
+++ b/src/conf/capabilities.c
@@ -129,7 +129,7 @@ virCapabilitiesFreeGuestDomain(virCapsGuestDomainPtr dom)
 
     VIR_FREE(dom->info.emulator);
     VIR_FREE(dom->info.loader);
-    for (i = 0 ; i < dom->info.nmachines ; i++)
+    for (i = 0; i < dom->info.nmachines; i++)
         virCapabilitiesFreeGuestMachine(dom->info.machines[i]);
     VIR_FREE(dom->info.machines);
     VIR_FREE(dom->type);
@@ -157,15 +157,15 @@ virCapabilitiesFreeGuest(virCapsGuestPtr guest)
 
     VIR_FREE(guest->arch.defaultInfo.emulator);
     VIR_FREE(guest->arch.defaultInfo.loader);
-    for (i = 0 ; i < guest->arch.defaultInfo.nmachines ; i++)
+    for (i = 0; i < guest->arch.defaultInfo.nmachines; i++)
         virCapabilitiesFreeGuestMachine(guest->arch.defaultInfo.machines[i]);
     VIR_FREE(guest->arch.defaultInfo.machines);
 
-    for (i = 0 ; i < guest->arch.ndomains ; i++)
+    for (i = 0; i < guest->arch.ndomains; i++)
         virCapabilitiesFreeGuestDomain(guest->arch.domains[i]);
     VIR_FREE(guest->arch.domains);
 
-    for (i = 0 ; i < guest->nfeatures ; i++)
+    for (i = 0; i < guest->nfeatures; i++)
         virCapabilitiesFreeGuestFeature(guest->features[i]);
     VIR_FREE(guest->features);
 
@@ -177,7 +177,7 @@ virCapabilitiesFreeNUMAInfo(virCapsPtr caps)
 {
     int i;
 
-    for (i = 0 ; i < caps->host.nnumaCell ; i++)
+    for (i = 0; i < caps->host.nnumaCell; i++)
         virCapabilitiesFreeHostNUMACell(caps->host.numaCell[i]);
     VIR_FREE(caps->host.numaCell);
     caps->host.nnumaCell = 0;
@@ -189,17 +189,17 @@ virCapabilitiesDispose(void *object)
     virCapsPtr caps = object;
     int i;
 
-    for (i = 0 ; i < caps->nguests ; i++)
+    for (i = 0; i < caps->nguests; i++)
         virCapabilitiesFreeGuest(caps->guests[i]);
     VIR_FREE(caps->guests);
 
-    for (i = 0 ; i < caps->host.nfeatures ; i++)
+    for (i = 0; i < caps->host.nfeatures; i++)
         VIR_FREE(caps->host.features[i]);
     VIR_FREE(caps->host.features);
 
     virCapabilitiesFreeNUMAInfo(caps);
 
-    for (i = 0 ; i < caps->host.nmigrateTrans ; i++)
+    for (i = 0; i < caps->host.nmigrateTrans; i++)
         VIR_FREE(caps->host.migrateTrans[i]);
     VIR_FREE(caps->host.migrateTrans);
 
@@ -527,7 +527,7 @@ virCapabilitiesSupportsGuestArch(virCapsPtr caps,
                                  virArch arch)
 {
     int i;
-    for (i = 0 ; i < caps->nguests ; i++) {
+    for (i = 0; i < caps->nguests; i++) {
         if (caps->guests[i]->arch.id == arch)
             return 1;
     }
@@ -548,7 +548,7 @@ virCapabilitiesSupportsGuestOSType(virCapsPtr caps,
                                    const char *ostype)
 {
     int i;
-    for (i = 0 ; i < caps->nguests ; i++) {
+    for (i = 0; i < caps->nguests; i++) {
         if (STREQ(caps->guests[i]->ostype, ostype))
             return 1;
     }
@@ -571,7 +571,7 @@ virCapabilitiesSupportsGuestOSTypeArch(virCapsPtr caps,
                                        virArch arch)
 {
     int i;
-    for (i = 0 ; i < caps->nguests ; i++) {
+    for (i = 0; i < caps->nguests; i++) {
         if (STREQ(caps->guests[i]->ostype, ostype) &&
             caps->guests[i]->arch.id == arch)
             return 1;
@@ -596,9 +596,9 @@ virCapabilitiesDefaultGuestArch(virCapsPtr caps,
     int i, j;
 
     /* First try to find one matching host arch */
-    for (i = 0 ; i < caps->nguests ; i++) {
+    for (i = 0; i < caps->nguests; i++) {
         if (STREQ(caps->guests[i]->ostype, ostype)) {
-            for (j = 0 ; j < caps->guests[i]->arch.ndomains ; j++) {
+            for (j = 0; j < caps->guests[i]->arch.ndomains; j++) {
                 if (STREQ(caps->guests[i]->arch.domains[j]->type, domain) &&
                     caps->guests[i]->arch.id == caps->host.arch)
                     return caps->guests[i]->arch.id;
@@ -607,9 +607,9 @@ virCapabilitiesDefaultGuestArch(virCapsPtr caps,
     }
 
     /* Otherwise find the first match */
-    for (i = 0 ; i < caps->nguests ; i++) {
+    for (i = 0; i < caps->nguests; i++) {
         if (STREQ(caps->guests[i]->ostype, ostype)) {
-            for (j = 0 ; j < caps->guests[i]->arch.ndomains ; j++) {
+            for (j = 0; j < caps->guests[i]->arch.ndomains; j++) {
                 if (STREQ(caps->guests[i]->arch.domains[j]->type, domain))
                     return caps->guests[i]->arch.id;
             }
@@ -638,7 +638,7 @@ virCapabilitiesDefaultGuestMachine(virCapsPtr caps,
 {
     int i;
 
-    for (i = 0 ; i < caps->nguests ; i++) {
+    for (i = 0; i < caps->nguests; i++) {
         virCapsGuestPtr guest = caps->guests[i];
         int j;
 
@@ -683,12 +683,12 @@ virCapabilitiesDefaultGuestEmulator(virCapsPtr caps,
                                     const char *domain)
 {
     int i, j;
-    for (i = 0 ; i < caps->nguests ; i++) {
+    for (i = 0; i < caps->nguests; i++) {
         char *emulator;
         if (STREQ(caps->guests[i]->ostype, ostype) &&
             caps->guests[i]->arch.id == arch) {
             emulator = caps->guests[i]->arch.defaultInfo.emulator;
-            for (j = 0 ; j < caps->guests[i]->arch.ndomains ; j++) {
+            for (j = 0; j < caps->guests[i]->arch.ndomains; j++) {
                 if (STREQ(caps->guests[i]->arch.domains[j]->type, domain)) {
                     if (caps->guests[i]->arch.domains[j]->info.emulator)
                         emulator = caps->guests[i]->arch.domains[j]->info.emulator;
@@ -778,7 +778,7 @@ virCapabilitiesFormatXML(virCapsPtr caps)
 
     if (caps->host.nfeatures) {
         virBufferAddLit(&xml, "      <features>\n");
-        for (i = 0 ; i < caps->host.nfeatures ; i++) {
+        for (i = 0; i < caps->host.nfeatures; i++) {
             virBufferAsprintf(&xml, "        <%s/>\n",
                               caps->host.features[i]);
         }
@@ -814,7 +814,7 @@ virCapabilitiesFormatXML(virCapsPtr caps)
             virBufferAddLit(&xml, "      <live/>\n");
         if (caps->host.nmigrateTrans) {
             virBufferAddLit(&xml, "      <uri_transports>\n");
-            for (i = 0 ; i < caps->host.nmigrateTrans ; i++) {
+            for (i = 0; i < caps->host.nmigrateTrans; i++) {
                 virBufferAsprintf(&xml, "        <uri_transport>%s</uri_transport>\n",
                                       caps->host.migrateTrans[i]);
             }
@@ -840,7 +840,7 @@ virCapabilitiesFormatXML(virCapsPtr caps)
     virBufferAddLit(&xml, "  </host>\n\n");
 
 
-    for (i = 0 ; i < caps->nguests ; i++) {
+    for (i = 0; i < caps->nguests; i++) {
         virBufferAddLit(&xml, "  <guest>\n");
         virBufferAsprintf(&xml, "    <os_type>%s</os_type>\n",
                           caps->guests[i]->ostype);
@@ -856,7 +856,7 @@ virCapabilitiesFormatXML(virCapsPtr caps)
                 virBufferAsprintf(&xml, "      <loader>%s</loader>\n",
                                   caps->guests[i]->arch.defaultInfo.loader);
 
-        for (j = 0 ; j < caps->guests[i]->arch.defaultInfo.nmachines ; j++) {
+        for (j = 0; j < caps->guests[i]->arch.defaultInfo.nmachines; j++) {
             virCapsGuestMachinePtr machine = caps->guests[i]->arch.defaultInfo.machines[j];
             virBufferAddLit(&xml, "      <machine");
             if (machine->canonical)
@@ -864,7 +864,7 @@ virCapabilitiesFormatXML(virCapsPtr caps)
             virBufferAsprintf(&xml, ">%s</machine>\n", machine->name);
         }
 
-        for (j = 0 ; j < caps->guests[i]->arch.ndomains ; j++) {
+        for (j = 0; j < caps->guests[i]->arch.ndomains; j++) {
             virBufferAsprintf(&xml, "      <domain type='%s'>\n",
                                   caps->guests[i]->arch.domains[j]->type);
             if (caps->guests[i]->arch.domains[j]->info.emulator)
@@ -874,7 +874,7 @@ virCapabilitiesFormatXML(virCapsPtr caps)
                 virBufferAsprintf(&xml, "        <loader>%s</loader>\n",
                                   caps->guests[i]->arch.domains[j]->info.loader);
 
-            for (k = 0 ; k < caps->guests[i]->arch.domains[j]->info.nmachines ; k++) {
+            for (k = 0; k < caps->guests[i]->arch.domains[j]->info.nmachines; k++) {
                 virCapsGuestMachinePtr machine = caps->guests[i]->arch.domains[j]->info.machines[k];
                 virBufferAddLit(&xml, "        <machine");
                 if (machine->canonical)
@@ -889,7 +889,7 @@ virCapabilitiesFormatXML(virCapsPtr caps)
         if (caps->guests[i]->nfeatures) {
             virBufferAddLit(&xml, "    <features>\n");
 
-            for (j = 0 ; j < caps->guests[i]->nfeatures ; j++) {
+            for (j = 0; j < caps->guests[i]->nfeatures; j++) {
                 if (STREQ(caps->guests[i]->features[j]->name, "pae") ||
                     STREQ(caps->guests[i]->features[j]->name, "nonpae") ||
                     STREQ(caps->guests[i]->features[j]->name, "ia64_be") ||
diff --git a/src/conf/cpu_conf.c b/src/conf/cpu_conf.c
index 6aaee75..a006556 100644
--- a/src/conf/cpu_conf.c
+++ b/src/conf/cpu_conf.c
@@ -81,7 +81,7 @@ virCPUDefFree(virCPUDefPtr def)
 
     virCPUDefFreeModel(def);
 
-    for (i = 0 ; i < def->ncells ; i++) {
+    for (i = 0; i < def->ncells; i++) {
         virBitmapFree(def->cells[i].cpumask);
         VIR_FREE(def->cells[i].cpustr);
     }
@@ -387,7 +387,7 @@ virCPUDefParseXML(const xmlNodePtr node,
         def->nfeatures = n;
     }
 
-    for (i = 0 ; i < n ; i++) {
+    for (i = 0; i < n; i++) {
         char *name;
         int policy; /* enum virDomainCPUFeaturePolicy */
         unsigned int j;
@@ -418,7 +418,7 @@ virCPUDefParseXML(const xmlNodePtr node,
             goto error;
         }
 
-        for (j = 0 ; j < i ; j++) {
+        for (j = 0; j < i; j++) {
             if (STREQ(name, def->features[j].name)) {
                 virReportError(VIR_ERR_INTERNAL_ERROR,
                                _("CPU feature `%s' specified more than once"),
@@ -447,7 +447,7 @@ virCPUDefParseXML(const xmlNodePtr node,
 
         def->ncells = n;
 
-        for (i = 0 ; i < n ; i++) {
+        for (i = 0; i < n; i++) {
             char *cpus, *memory;
             int ret, ncpus = 0;
 
@@ -630,7 +630,7 @@ virCPUDefFormatBuf(virBufferPtr buf,
     }
 
     if (formatModel) {
-        for (i = 0 ; i < def->nfeatures ; i++) {
+        for (i = 0; i < def->nfeatures; i++) {
             virCPUFeatureDefPtr feature = def->features + i;
 
             if (!feature->name) {
@@ -679,7 +679,7 @@ virCPUDefAddFeature(virCPUDefPtr def,
 {
     int i;
 
-    for (i = 0 ; i < def->nfeatures ; i++) {
+    for (i = 0; i < def->nfeatures; i++) {
         if (STREQ(name, def->features[i].name)) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
                            _("CPU feature `%s' specified more than once"), name);
@@ -796,7 +796,7 @@ virCPUDefIsEqual(virCPUDefPtr src,
         goto cleanup;
     }
 
-    for (i = 0 ; i < src->nfeatures ; i++) {
+    for (i = 0; i < src->nfeatures; i++) {
         if (STRNEQ(src->features[i].name, dst->features[i].name)) {
             virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
                            _("Target CPU feature %s does not match source %s"),
diff --git a/src/conf/domain_audit.c b/src/conf/domain_audit.c
index a6cefb2..fd3de5e 100644
--- a/src/conf/domain_audit.c
+++ b/src/conf/domain_audit.c
@@ -795,28 +795,28 @@ virDomainAuditStart(virDomainObjPtr vm, const char *reason, bool success)
 {
     int i;
 
-    for (i = 0 ; i < vm->def->ndisks ; i++) {
+    for (i = 0; i < vm->def->ndisks; i++) {
         virDomainDiskDefPtr disk = vm->def->disks[i];
         if (disk->src) /* Skips CDROM without media initially inserted */
             virDomainAuditDisk(vm, NULL, disk->src, "start", true);
     }
 
-    for (i = 0 ; i < vm->def->nfss ; i++) {
+    for (i = 0; i < vm->def->nfss; i++) {
         virDomainFSDefPtr fs = vm->def->fss[i];
         virDomainAuditFS(vm, NULL, fs, "start", true);
     }
 
-    for (i = 0 ; i < vm->def->nnets ; i++) {
+    for (i = 0; i < vm->def->nnets; i++) {
         virDomainNetDefPtr net = vm->def->nets[i];
         virDomainAuditNet(vm, NULL, net, "start", true);
     }
 
-    for (i = 0 ; i < vm->def->nhostdevs ; i++) {
+    for (i = 0; i < vm->def->nhostdevs; i++) {
         virDomainHostdevDefPtr hostdev = vm->def->hostdevs[i];
         virDomainAuditHostdev(vm, hostdev, "start", true);
     }
 
-    for (i = 0 ; i < vm->def->nredirdevs ; i++) {
+    for (i = 0; i < vm->def->nredirdevs; i++) {
         virDomainRedirdevDefPtr redirdev = vm->def->redirdevs[i];
         virDomainAuditRedirdev(vm, redirdev, "start", true);
     }
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index e7a0381..a8aed06 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -1186,7 +1186,7 @@ void virDomainDiskDefFree(virDomainDiskDefPtr def)
         VIR_FREE(def->seclabels);
     }
 
-    for (i = 0 ; i < def->nhosts ; i++)
+    for (i = 0; i < def->nhosts; i++)
         virDomainDiskHostDefFree(&def->hosts[i]);
     VIR_FREE(def->hosts);
 
@@ -1562,7 +1562,7 @@ void virDomainSoundDefFree(virDomainSoundDefPtr def)
     virDomainDeviceInfoClear(&def->info);
 
     int i;
-    for (i = 0 ; i < def->ncodecs ; i++)
+    for (i = 0; i < def->ncodecs; i++)
         virDomainSoundCodecDefFree(def->codecs[i]);
     VIR_FREE(def->codecs);
 
@@ -1885,71 +1885,71 @@ void virDomainDefFree(virDomainDefPtr def)
      * so the original object must still be available during the call
      * to virDomainHostdevDefFree().
      */
-    for (i = 0 ; i < def->nhostdevs ; i++)
+    for (i = 0; i < def->nhostdevs; i++)
         virDomainHostdevDefFree(def->hostdevs[i]);
     VIR_FREE(def->hostdevs);
 
-    for (i = 0 ; i < def->nleases ; i++)
+    for (i = 0; i < def->nleases; i++)
         virDomainLeaseDefFree(def->leases[i]);
     VIR_FREE(def->leases);
 
-    for (i = 0 ; i < def->ngraphics ; i++)
+    for (i = 0; i < def->ngraphics; i++)
         virDomainGraphicsDefFree(def->graphics[i]);
     VIR_FREE(def->graphics);
 
-    for (i = 0 ; i < def->ninputs ; i++)
+    for (i = 0; i < def->ninputs; i++)
         virDomainInputDefFree(def->inputs[i]);
     VIR_FREE(def->inputs);
 
-    for (i = 0 ; i < def->ndisks ; i++)
+    for (i = 0; i < def->ndisks; i++)
         virDomainDiskDefFree(def->disks[i]);
     VIR_FREE(def->disks);
 
-    for (i = 0 ; i < def->ncontrollers ; i++)
+    for (i = 0; i < def->ncontrollers; i++)
         virDomainControllerDefFree(def->controllers[i]);
     VIR_FREE(def->controllers);
 
-    for (i = 0 ; i < def->nfss ; i++)
+    for (i = 0; i < def->nfss; i++)
         virDomainFSDefFree(def->fss[i]);
     VIR_FREE(def->fss);
 
-    for (i = 0 ; i < def->nnets ; i++)
+    for (i = 0; i < def->nnets; i++)
         virDomainNetDefFree(def->nets[i]);
     VIR_FREE(def->nets);
 
-    for (i = 0 ; i < def->nsmartcards ; i++)
+    for (i = 0; i < def->nsmartcards; i++)
         virDomainSmartcardDefFree(def->smartcards[i]);
     VIR_FREE(def->smartcards);
 
-    for (i = 0 ; i < def->nserials ; i++)
+    for (i = 0; i < def->nserials; i++)
         virDomainChrDefFree(def->serials[i]);
     VIR_FREE(def->serials);
 
-    for (i = 0 ; i < def->nparallels ; i++)
+    for (i = 0; i < def->nparallels; i++)
         virDomainChrDefFree(def->parallels[i]);
     VIR_FREE(def->parallels);
 
-    for (i = 0 ; i < def->nchannels ; i++)
+    for (i = 0; i < def->nchannels; i++)
         virDomainChrDefFree(def->channels[i]);
     VIR_FREE(def->channels);
 
-    for (i = 0 ; i < def->nconsoles ; i++)
+    for (i = 0; i < def->nconsoles; i++)
         virDomainChrDefFree(def->consoles[i]);
     VIR_FREE(def->consoles);
 
-    for (i = 0 ; i < def->nsounds ; i++)
+    for (i = 0; i < def->nsounds; i++)
         virDomainSoundDefFree(def->sounds[i]);
     VIR_FREE(def->sounds);
 
-    for (i = 0 ; i < def->nvideos ; i++)
+    for (i = 0; i < def->nvideos; i++)
         virDomainVideoDefFree(def->videos[i]);
     VIR_FREE(def->videos);
 
-    for (i = 0 ; i < def->nhubs ; i++)
+    for (i = 0; i < def->nhubs; i++)
         virDomainHubDefFree(def->hubs[i]);
     VIR_FREE(def->hubs);
 
-    for (i = 0 ; i < def->nredirdevs ; i++)
+    for (i = 0; i < def->nredirdevs; i++)
         virDomainRedirdevDefFree(def->redirdevs[i]);
     VIR_FREE(def->redirdevs);
 
@@ -1960,7 +1960,7 @@ void virDomainDefFree(virDomainDefPtr def)
     VIR_FREE(def->os.type);
     VIR_FREE(def->os.machine);
     VIR_FREE(def->os.init);
-    for (i = 0 ; def->os.initargv && def->os.initargv[i] ; i++)
+    for (i = 0; def->os.initargv && def->os.initargv[i]; i++)
         VIR_FREE(def->os.initargv[i]);
     VIR_FREE(def->os.initargv);
     VIR_FREE(def->os.kernel);
@@ -2458,64 +2458,64 @@ virDomainDeviceInfoIterateInternal(virDomainDefPtr def,
     virDomainDeviceDef device;
 
     device.type = VIR_DOMAIN_DEVICE_DISK;
-    for (i = 0; i < def->ndisks ; i++) {
+    for (i = 0; i < def->ndisks; i++) {
         device.data.disk = def->disks[i];
         if (cb(def, &device, &def->disks[i]->info, opaque) < 0)
             return -1;
     }
     device.type = VIR_DOMAIN_DEVICE_NET;
-    for (i = 0; i < def->nnets ; i++) {
+    for (i = 0; i < def->nnets; i++) {
         device.data.net = def->nets[i];
         if (cb(def, &device, &def->nets[i]->info, opaque) < 0)
             return -1;
     }
     device.type = VIR_DOMAIN_DEVICE_SOUND;
-    for (i = 0; i < def->nsounds ; i++) {
+    for (i = 0; i < def->nsounds; i++) {
         device.data.sound = def->sounds[i];
         if (cb(def, &device, &def->sounds[i]->info, opaque) < 0)
             return -1;
     }
     device.type = VIR_DOMAIN_DEVICE_HOSTDEV;
-    for (i = 0; i < def->nhostdevs ; i++) {
+    for (i = 0; i < def->nhostdevs; i++) {
         device.data.hostdev = def->hostdevs[i];
         if (cb(def, &device, def->hostdevs[i]->info, opaque) < 0)
             return -1;
     }
     device.type = VIR_DOMAIN_DEVICE_VIDEO;
-    for (i = 0; i < def->nvideos ; i++) {
+    for (i = 0; i < def->nvideos; i++) {
         device.data.video = def->videos[i];
         if (cb(def, &device, &def->videos[i]->info, opaque) < 0)
             return -1;
     }
     device.type = VIR_DOMAIN_DEVICE_CONTROLLER;
-    for (i = 0; i < def->ncontrollers ; i++) {
+    for (i = 0; i < def->ncontrollers; i++) {
         device.data.controller = def->controllers[i];
         if (cb(def, &device, &def->controllers[i]->info, opaque) < 0)
             return -1;
     }
     device.type = VIR_DOMAIN_DEVICE_SMARTCARD;
-    for (i = 0; i < def->nsmartcards ; i++) {
+    for (i = 0; i < def->nsmartcards; i++) {
         device.data.smartcard = def->smartcards[i];
         if (cb(def, &device, &def->smartcards[i]->info, opaque) < 0)
             return -1;
     }
     device.type = VIR_DOMAIN_DEVICE_CHR;
-    for (i = 0; i < def->nserials ; i++) {
+    for (i = 0; i < def->nserials; i++) {
         device.data.chr = def->serials[i];
         if (cb(def, &device, &def->serials[i]->info, opaque) < 0)
             return -1;
     }
-    for (i = 0; i < def->nparallels ; i++) {
+    for (i = 0; i < def->nparallels; i++) {
         device.data.chr = def->parallels[i];
         if (cb(def, &device, &def->parallels[i]->info, opaque) < 0)
             return -1;
     }
-    for (i = 0; i < def->nchannels ; i++) {
+    for (i = 0; i < def->nchannels; i++) {
         device.data.chr = def->channels[i];
         if (cb(def, &device, &def->channels[i]->info, opaque) < 0)
             return -1;
     }
-    for (i = 0; i < def->nconsoles ; i++) {
+    for (i = 0; i < def->nconsoles; i++) {
         if (!all &&
             i == 0 &&
             (def->consoles[i]->targetType == VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_SERIAL ||
@@ -2527,13 +2527,13 @@ virDomainDeviceInfoIterateInternal(virDomainDefPtr def,
             return -1;
     }
     device.type = VIR_DOMAIN_DEVICE_INPUT;
-    for (i = 0; i < def->ninputs ; i++) {
+    for (i = 0; i < def->ninputs; i++) {
         device.data.input = def->inputs[i];
         if (cb(def, &device, &def->inputs[i]->info, opaque) < 0)
             return -1;
     }
     device.type = VIR_DOMAIN_DEVICE_FS;
-    for (i = 0; i < def->nfss ; i++) {
+    for (i = 0; i < def->nfss; i++) {
         device.data.fs = def->fss[i];
         if (cb(def, &device, &def->fss[i]->info, opaque) < 0)
             return -1;
@@ -2563,7 +2563,7 @@ virDomainDeviceInfoIterateInternal(virDomainDefPtr def,
             return -1;
     }
     device.type = VIR_DOMAIN_DEVICE_HUB;
-    for (i = 0; i < def->nhubs ; i++) {
+    for (i = 0; i < def->nhubs; i++) {
         device.data.hub = def->hubs[i];
         if (cb(def, &device, &def->hubs[i]->info, opaque) < 0)
             return -1;
@@ -4002,7 +4002,7 @@ virDomainDiskFindByBusAndDst(virDomainDefPtr def,
     if (!dst)
         return NULL;
 
-    for (i = 0 ; i < def->ndisks ; i++) {
+    for (i = 0; i < def->ndisks; i++) {
         if (def->disks[i]->bus == bus &&
             STREQ(def->disks[i]->dst, dst)) {
             return def->disks[i];
@@ -9488,7 +9488,7 @@ virDomainHostdevFind(virDomainDefPtr def,
         found = &local_found;
     *found = NULL;
 
-    for (i = 0 ; i < def->nhostdevs ; i++) {
+    for (i = 0; i < def->nhostdevs; i++) {
         if (virDomainHostdevMatch(match, def->hostdevs[i])) {
             *found = def->hostdevs[i];
             break;
@@ -9561,7 +9561,7 @@ void virDomainDiskInsertPreAlloced(virDomainDefPtr def,
      * index greater than the new one, insert at
      * that position
      */
-    for (i = (def->ndisks - 1) ; i >= 0 ; i--) {
+    for (i = (def->ndisks - 1); i >= 0; i--) {
         /* If bus matches and current disk is after
          * new disk, then new disk should go here */
         if (def->disks[i]->bus == disk->bus &&
@@ -9660,7 +9660,7 @@ virDomainNetFindIdx(virDomainDefPtr def, virDomainNetDefPtr net)
     bool PCIAddrSpecified = virDomainDeviceAddressIsValid(&net->info,
                                                           VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI);
 
-    for (ii = 0 ; ii < def->nnets ; ii++) {
+    for (ii = 0; ii < def->nnets; ii++) {
         if (virMacAddrCmp(&def->nets[ii]->mac, &net->mac))
             continue;
 
@@ -9750,7 +9750,7 @@ void virDomainControllerInsertPreAlloced(virDomainDefPtr def,
      * index greater than the new one, insert at
      * that position
      */
-    for (i = (def->ncontrollers - 1) ; i >= 0 ; i--) {
+    for (i = (def->ncontrollers - 1); i >= 0; i--) {
         /* If bus matches and current controller is after
          * new controller, then new controller should go here */
         if (def->controllers[i]->type == controller->type &&
@@ -9784,7 +9784,7 @@ virDomainControllerFind(virDomainDefPtr def,
 {
     int i;
 
-    for (i = 0 ; i < def->ncontrollers ; i++) {
+    for (i = 0; i < def->ncontrollers; i++) {
         if ((def->controllers[i]->type == type) &&
             (def->controllers[i]->idx == idx)) {
             return i;
@@ -9964,7 +9964,7 @@ virDomainDefParseBootXML(xmlXPathContextPtr ctxt,
         goto cleanup;
     }
 
-    for (i = 0 ; i < n && i < VIR_DOMAIN_BOOT_LAST ; i++) {
+    for (i = 0; i < n && i < VIR_DOMAIN_BOOT_LAST; i++) {
         int val;
         char *dev = virXMLPropString(nodes[i], "dev");
         if (!dev) {
@@ -10612,7 +10612,7 @@ virDomainDefParseXML(xmlDocPtr xml,
         goto error;
     }
 
-    for (i = 0 ; i < n ; i++) {
+    for (i = 0; i < n; i++) {
         virDomainVcpuPinDefPtr vcpupin = NULL;
         vcpupin = virDomainVcpuPinDefParseXML(nodes[i], ctxt, def->maxvcpus, 0);
 
@@ -10835,7 +10835,7 @@ virDomainDefParseXML(xmlDocPtr xml,
     if ((n = virXPathNodeSet("./features/*", ctxt, &nodes)) < 0)
         goto error;
 
-    for (i = 0 ; i < n ; i++) {
+    for (i = 0; i < n; i++) {
         int val = virDomainFeatureTypeFromString((const char *)nodes[i]->name);
         if (val < 0) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
@@ -11019,7 +11019,7 @@ virDomainDefParseXML(xmlDocPtr xml,
     if (n && VIR_ALLOC_N(def->clock.timers, n) < 0)
         goto no_memory;
 
-    for (i = 0 ; i < n ; i++) {
+    for (i = 0; i < n; i++) {
         virDomainTimerDefPtr timer = virDomainTimerDefParseXML(nodes[i],
                                                                ctxt);
         if (!timer)
@@ -11135,7 +11135,7 @@ virDomainDefParseXML(xmlDocPtr xml,
 
         if (VIR_ALLOC_N(def->os.initargv, n+1) < 0)
             goto no_memory;
-        for (i = 0 ; i < n ; i++) {
+        for (i = 0; i < n; i++) {
             if (!nodes[i]->children ||
                 !nodes[i]->children->content) {
                 virReportError(VIR_ERR_XML_ERROR, "%s",
@@ -11176,7 +11176,7 @@ virDomainDefParseXML(xmlDocPtr xml,
     if (n && VIR_ALLOC_N(def->disks, n) < 0)
         goto no_memory;
 
-    for (i = 0 ; i < n ; i++) {
+    for (i = 0; i < n; i++) {
         virDomainDiskDefPtr disk = virDomainDiskDefParseXML(xmlopt,
                                                             nodes[i],
                                                             ctxt,
@@ -11198,7 +11198,7 @@ virDomainDefParseXML(xmlDocPtr xml,
     if (n && VIR_ALLOC_N(def->controllers, n) < 0)
         goto no_memory;
 
-    for (i = 0 ; i < n ; i++) {
+    for (i = 0; i < n; i++) {
         virDomainControllerDefPtr controller = virDomainControllerDefParseXML(nodes[i],
                                                                               flags);
         if (!controller)
@@ -11254,7 +11254,7 @@ virDomainDefParseXML(xmlDocPtr xml,
     }
     if (n && VIR_ALLOC_N(def->leases, n) < 0)
         goto no_memory;
-    for (i = 0 ; i < n ; i++) {
+    for (i = 0; i < n; i++) {
         virDomainLeaseDefPtr lease = virDomainLeaseDefParseXML(nodes[i]);
         if (!lease)
             goto error;
@@ -11269,7 +11269,7 @@ virDomainDefParseXML(xmlDocPtr xml,
     }
     if (n && VIR_ALLOC_N(def->fss, n) < 0)
         goto no_memory;
-    for (i = 0 ; i < n ; i++) {
+    for (i = 0; i < n; i++) {
         virDomainFSDefPtr fs = virDomainFSDefParseXML(nodes[i], ctxt,
                                                       flags);
         if (!fs)
@@ -11285,7 +11285,7 @@ virDomainDefParseXML(xmlDocPtr xml,
     }
     if (n && VIR_ALLOC_N(def->nets, n) < 0)
         goto no_memory;
-    for (i = 0 ; i < n ; i++) {
+    for (i = 0; i < n; i++) {
         virDomainNetDefPtr net = virDomainNetDefParseXML(xmlopt,
                                                          nodes[i],
                                                          ctxt,
@@ -11312,7 +11312,7 @@ virDomainDefParseXML(xmlDocPtr xml,
     if (n && VIR_ALLOC_N(def->smartcards, n) < 0)
         goto no_memory;
 
-    for (i = 0 ; i < n ; i++) {
+    for (i = 0; i < n; i++) {
         virDomainSmartcardDefPtr card = virDomainSmartcardDefParseXML(nodes[i],
                                                                       flags);
         if (!card)
@@ -11330,7 +11330,7 @@ virDomainDefParseXML(xmlDocPtr xml,
     if (n && VIR_ALLOC_N(def->parallels, n) < 0)
         goto no_memory;
 
-    for (i = 0 ; i < n ; i++) {
+    for (i = 0; i < n; i++) {
         virDomainChrDefPtr chr = virDomainChrDefParseXML(ctxt,
                                                          nodes[i],
                                                          def->seclabels,
@@ -11342,7 +11342,7 @@ virDomainDefParseXML(xmlDocPtr xml,
         if (chr->target.port == -1) {
             int maxport = -1;
             int j;
-            for (j = 0 ; j < i ; j++) {
+            for (j = 0; j < i; j++) {
                 if (def->parallels[j]->target.port > maxport)
                     maxport = def->parallels[j]->target.port;
             }
@@ -11358,7 +11358,7 @@ virDomainDefParseXML(xmlDocPtr xml,
     if (n && VIR_ALLOC_N(def->serials, n) < 0)
         goto no_memory;
 
-    for (i = 0 ; i < n ; i++) {
+    for (i = 0; i < n; i++) {
         virDomainChrDefPtr chr = virDomainChrDefParseXML(ctxt,
                                                          nodes[i],
                                                          def->seclabels,
@@ -11370,7 +11370,7 @@ virDomainDefParseXML(xmlDocPtr xml,
         if (chr->target.port == -1) {
             int maxport = -1;
             int j;
-            for (j = 0 ; j < i ; j++) {
+            for (j = 0; j < i; j++) {
                 if (def->serials[j]->target.port > maxport)
                     maxport = def->serials[j]->target.port;
             }
@@ -11388,7 +11388,7 @@ virDomainDefParseXML(xmlDocPtr xml,
     if (n && VIR_ALLOC_N(def->consoles, n) < 0)
         goto no_memory;
 
-    for (i = 0 ; i < n ; i++) {
+    for (i = 0; i < n; i++) {
         virDomainChrDefPtr chr = virDomainChrDefParseXML(ctxt,
                                                          nodes[i],
                                                          def->seclabels,
@@ -11408,7 +11408,7 @@ virDomainDefParseXML(xmlDocPtr xml,
     if (n && VIR_ALLOC_N(def->channels, n) < 0)
         goto no_memory;
 
-    for (i = 0 ; i < n ; i++) {
+    for (i = 0; i < n; i++) {
         virDomainChrDefPtr chr = virDomainChrDefParseXML(ctxt,
                                                          nodes[i],
                                                          def->seclabels,
@@ -11428,7 +11428,7 @@ virDomainDefParseXML(xmlDocPtr xml,
             chr->info.addr.vioserial.port == 0) {
             int maxport = 0;
             int j;
-            for (j = 0 ; j < i ; j++) {
+            for (j = 0; j < i; j++) {
                 virDomainChrDefPtr thischr = def->channels[j];
                 if (thischr->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_VIRTIO_SERIAL &&
                     thischr->info.addr.vioserial.controller == chr->info.addr.vioserial.controller &&
@@ -11449,7 +11449,7 @@ virDomainDefParseXML(xmlDocPtr xml,
     if (n && VIR_ALLOC_N(def->inputs, n) < 0)
         goto no_memory;
 
-    for (i = 0 ; i < n ; i++) {
+    for (i = 0; i < n; i++) {
         virDomainInputDefPtr input = virDomainInputDefParseXML(def->os.type,
                                                                nodes[i],
                                                                flags);
@@ -11488,7 +11488,7 @@ virDomainDefParseXML(xmlDocPtr xml,
     }
     if (n && VIR_ALLOC_N(def->graphics, n) < 0)
         goto no_memory;
-    for (i = 0 ; i < n ; i++) {
+    for (i = 0; i < n; i++) {
         virDomainGraphicsDefPtr graphics = virDomainGraphicsDefParseXML(nodes[i],
                                                                         ctxt,
                                                                         flags);
@@ -11529,7 +11529,7 @@ virDomainDefParseXML(xmlDocPtr xml,
     }
     if (n && VIR_ALLOC_N(def->sounds, n) < 0)
         goto no_memory;
-    for (i = 0 ; i < n ; i++) {
+    for (i = 0; i < n; i++) {
         virDomainSoundDefPtr sound = virDomainSoundDefParseXML(nodes[i],
                                                                ctxt,
                                                                flags);
@@ -11546,7 +11546,7 @@ virDomainDefParseXML(xmlDocPtr xml,
     }
     if (n && VIR_ALLOC_N(def->videos, n) < 0)
         goto no_memory;
-    for (i = 0 ; i < n ; i++) {
+    for (i = 0; i < n; i++) {
         size_t ii = def->nvideos;
         virDomainVideoDefPtr video = virDomainVideoDefParseXML(nodes[i],
                                                                def,
@@ -11603,7 +11603,7 @@ virDomainDefParseXML(xmlDocPtr xml,
     }
     if (n && VIR_REALLOC_N(def->hostdevs, def->nhostdevs + n) < 0)
         goto no_memory;
-    for (i = 0 ; i < n ; i++) {
+    for (i = 0; i < n; i++) {
         virDomainHostdevDefPtr hostdev;
 
         hostdev = virDomainHostdevDefParseXML(nodes[i], ctxt, bootHash, flags);
@@ -11731,7 +11731,7 @@ virDomainDefParseXML(xmlDocPtr xml,
     }
     if (n && VIR_ALLOC_N(def->hubs, n) < 0)
         goto no_memory;
-    for (i = 0 ; i < n ; i++) {
+    for (i = 0; i < n; i++) {
         virDomainHubDefPtr hub = virDomainHubDefParseXML(nodes[i], flags);
         if (!hub)
             goto error;
@@ -11754,7 +11754,7 @@ virDomainDefParseXML(xmlDocPtr xml,
     }
     if (n && VIR_ALLOC_N(def->redirdevs, n) < 0)
         goto no_memory;
-    for (i = 0 ; i < n ; i++) {
+    for (i = 0; i < n; i++) {
         virDomainRedirdevDefPtr redirdev = virDomainRedirdevDefParseXML(nodes[i],
                                                                         bootHash,
                                                                         flags);
@@ -11947,7 +11947,7 @@ virDomainObjParseXML(xmlDocPtr xml,
     if ((n = virXPathNodeSet("./taint", ctxt, &nodes)) < 0) {
         goto error;
     }
-    for (i = 0 ; i < n ; i++) {
+    for (i = 0; i < n; i++) {
         char *str = virXMLPropString(nodes[i], "flag");
         if (str) {
             int flag = virDomainTaintTypeFromString(str);
@@ -12881,7 +12881,7 @@ virDomainDefCheckABIStability(virDomainDefPtr src,
         return false;
     }
 
-    for (i = 0 ; i < src->clock.ntimers ; i++) {
+    for (i = 0; i < src->clock.ntimers; i++) {
         if (!virDomainTimerDefCheckABIStability(src->clock.timers[i],
                                                 dst->clock.timers[i]))
             return false;
@@ -12900,7 +12900,7 @@ virDomainDefCheckABIStability(virDomainDefPtr src,
         return false;
     }
 
-    for (i = 0 ; i < src->ndisks ; i++)
+    for (i = 0; i < src->ndisks; i++)
         if (!virDomainDiskDefCheckABIStability(src->disks[i], dst->disks[i]))
             return false;
 
@@ -12912,7 +12912,7 @@ virDomainDefCheckABIStability(virDomainDefPtr src,
         return false;
     }
 
-    for (i = 0 ; i < src->ncontrollers ; i++)
+    for (i = 0; i < src->ncontrollers; i++)
         if (!virDomainControllerDefCheckABIStability(src->controllers[i],
                                                      dst->controllers[i]))
             return false;
@@ -12925,7 +12925,7 @@ virDomainDefCheckABIStability(virDomainDefPtr src,
         return false;
     }
 
-    for (i = 0 ; i < src->nfss ; i++)
+    for (i = 0; i < src->nfss; i++)
         if (!virDomainFsDefCheckABIStability(src->fss[i], dst->fss[i]))
             return false;
 
@@ -12937,7 +12937,7 @@ virDomainDefCheckABIStability(virDomainDefPtr src,
         return false;
     }
 
-    for (i = 0 ; i < src->nnets ; i++)
+    for (i = 0; i < src->nnets; i++)
         if (!virDomainNetDefCheckABIStability(src->nets[i], dst->nets[i]))
             return false;
 
@@ -12949,7 +12949,7 @@ virDomainDefCheckABIStability(virDomainDefPtr src,
         return false;
     }
 
-    for (i = 0 ; i < src->ninputs ; i++)
+    for (i = 0; i < src->ninputs; i++)
         if (!virDomainInputDefCheckABIStability(src->inputs[i], dst->inputs[i]))
             return false;
 
@@ -12961,7 +12961,7 @@ virDomainDefCheckABIStability(virDomainDefPtr src,
         return false;
     }
 
-    for (i = 0 ; i < src->nsounds ; i++)
+    for (i = 0; i < src->nsounds; i++)
         if (!virDomainSoundDefCheckABIStability(src->sounds[i], dst->sounds[i]))
             return false;
 
@@ -12973,7 +12973,7 @@ virDomainDefCheckABIStability(virDomainDefPtr src,
         return false;
     }
 
-    for (i = 0 ; i < src->nvideos ; i++)
+    for (i = 0; i < src->nvideos; i++)
         if (!virDomainVideoDefCheckABIStability(src->videos[i], dst->videos[i]))
             return false;
 
@@ -12985,7 +12985,7 @@ virDomainDefCheckABIStability(virDomainDefPtr src,
         return false;
     }
 
-    for (i = 0 ; i < src->nhostdevs ; i++)
+    for (i = 0; i < src->nhostdevs; i++)
         if (!virDomainHostdevDefCheckABIStability(src->hostdevs[i],
                                                   dst->hostdevs[i]))
             return false;
@@ -12998,7 +12998,7 @@ virDomainDefCheckABIStability(virDomainDefPtr src,
         return false;
     }
 
-    for (i = 0 ; i < src->nsmartcards ; i++)
+    for (i = 0; i < src->nsmartcards; i++)
         if (!virDomainSmartcardDefCheckABIStability(src->smartcards[i],
                                                     dst->smartcards[i]))
             return false;
@@ -13011,7 +13011,7 @@ virDomainDefCheckABIStability(virDomainDefPtr src,
         return false;
     }
 
-    for (i = 0 ; i < src->nserials ; i++)
+    for (i = 0; i < src->nserials; i++)
         if (!virDomainSerialDefCheckABIStability(src->serials[i],
                                                  dst->serials[i]))
             return false;
@@ -13024,7 +13024,7 @@ virDomainDefCheckABIStability(virDomainDefPtr src,
         return false;
     }
 
-    for (i = 0 ; i < src->nparallels ; i++)
+    for (i = 0; i < src->nparallels; i++)
         if (!virDomainParallelDefCheckABIStability(src->parallels[i],
                                                    dst->parallels[i]))
             return false;
@@ -13037,7 +13037,7 @@ virDomainDefCheckABIStability(virDomainDefPtr src,
         return false;
     }
 
-    for (i = 0 ; i < src->nchannels ; i++)
+    for (i = 0; i < src->nchannels; i++)
         if (!virDomainChannelDefCheckABIStability(src->channels[i],
                                                   dst->channels[i]))
             return false;
@@ -13050,7 +13050,7 @@ virDomainDefCheckABIStability(virDomainDefPtr src,
         return false;
     }
 
-    for (i = 0 ; i < src->nconsoles ; i++)
+    for (i = 0; i < src->nconsoles; i++)
         if (!virDomainConsoleDefCheckABIStability(src->consoles[i],
                                                   dst->consoles[i]))
             return false;
@@ -13063,7 +13063,7 @@ virDomainDefCheckABIStability(virDomainDefPtr src,
         return false;
     }
 
-    for (i = 0 ; i < src->nhubs ; i++)
+    for (i = 0; i < src->nhubs; i++)
         if (!virDomainHubDefCheckABIStability(src->hubs[i], dst->hubs[i]))
             return false;
 
@@ -13123,7 +13123,7 @@ virDomainDefAddDiskControllersForType(virDomainDefPtr def,
     int i;
     int maxController = -1;
 
-    for (i = 0 ; i < def->ndisks ; i++) {
+    for (i = 0; i < def->ndisks; i++) {
         if (def->disks[i]->bus != diskBus)
             continue;
 
@@ -13134,7 +13134,7 @@ virDomainDefAddDiskControllersForType(virDomainDefPtr def,
             maxController = def->disks[i]->info.addr.drive.controller;
     }
 
-    for (i = 0 ; i <= maxController ; i++) {
+    for (i = 0; i <= maxController; i++) {
         if (virDomainDefMaybeAddController(def, controllerType, i, -1) < 0)
             return -1;
     }
@@ -13149,7 +13149,7 @@ virDomainDefMaybeAddVirtioSerialController(virDomainDefPtr def)
     /* Look for any virtio serial or virtio console devs */
     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) {
@@ -13163,7 +13163,7 @@ virDomainDefMaybeAddVirtioSerialController(virDomainDefPtr def)
         }
     }
 
-    for (i = 0 ; i < def->nconsoles ; i++) {
+    for (i = 0; i < def->nconsoles; i++) {
         virDomainChrDefPtr console = def->consoles[i];
 
         if (console->targetType == VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_VIRTIO) {
@@ -13188,7 +13188,7 @@ virDomainDefMaybeAddSmartcardController(virDomainDefPtr def)
     /* Look for any smartcard devs */
     int i;
 
-    for (i = 0 ; i < def->nsmartcards ; i++) {
+    for (i = 0; i < def->nsmartcards; i++) {
         virDomainSmartcardDefPtr smartcard = def->smartcards[i];
         int idx = 0;
 
@@ -15367,7 +15367,7 @@ virDomainGraphicsDefFormat(virBufferPtr buf,
     }
 
     if (def->type == VIR_DOMAIN_GRAPHICS_TYPE_SPICE) {
-        for (i = 0 ; i < VIR_DOMAIN_GRAPHICS_SPICE_CHANNEL_LAST ; i++) {
+        for (i = 0; i < VIR_DOMAIN_GRAPHICS_SPICE_CHANNEL_LAST; i++) {
             int mode = def->data.spice.channels[i];
             if (mode == VIR_DOMAIN_GRAPHICS_SPICE_CHANNEL_MODE_ANY)
                 continue;
@@ -15925,7 +15925,7 @@ virDomainDefFormatInternal(virDomainDefPtr def,
 
     virBufferEscapeString(buf, "    <init>%s</init>\n",
                           def->os.init);
-    for (i = 0 ; def->os.initargv && def->os.initargv[i] ; i++)
+    for (i = 0; def->os.initargv && def->os.initargv[i]; i++)
         virBufferEscapeString(buf, "    <initarg>%s</initarg>\n",
                               def->os.initargv[i]);
     virBufferEscapeString(buf, "    <loader>%s</loader>\n",
@@ -15942,7 +15942,7 @@ virDomainDefFormatInternal(virDomainDefPtr def,
                           def->os.root);
 
     if (!def->os.bootloader) {
-        for (n = 0 ; n < def->os.nBootDevs ; n++) {
+        for (n = 0; n < def->os.nBootDevs; n++) {
             const char *boottype =
                 virDomainBootTypeToString(def->os.bootDevs[n]);
             if (!boottype) {
@@ -15991,7 +15991,7 @@ virDomainDefFormatInternal(virDomainDefPtr def,
 
     if (def->features) {
         virBufferAddLit(buf, "  <features>\n");
-        for (i = 0 ; i < VIR_DOMAIN_FEATURE_LAST ; i++) {
+        for (i = 0; i < VIR_DOMAIN_FEATURE_LAST; i++) {
             if (def->features & (1 << i) && i != VIR_DOMAIN_FEATURE_HYPERV) {
                 const char *name = virDomainFeatureTypeToString(i);
                 if (!name) {
@@ -16099,39 +16099,39 @@ virDomainDefFormatInternal(virDomainDefPtr def,
     virBufferEscapeString(buf, "    <emulator>%s</emulator>\n",
                           def->emulator);
 
-    for (n = 0 ; n < def->ndisks ; n++)
+    for (n = 0; n < def->ndisks; n++)
         if (virDomainDiskDefFormat(buf, def->disks[n], flags) < 0)
             goto error;
 
-    for (n = 0 ; n < def->ncontrollers ; n++)
+    for (n = 0; n < def->ncontrollers; n++)
         if (virDomainControllerDefFormat(buf, def->controllers[n], flags) < 0)
             goto error;
 
-    for (n = 0 ; n < def->nleases ; n++)
+    for (n = 0; n < def->nleases; n++)
         if (virDomainLeaseDefFormat(buf, def->leases[n]) < 0)
             goto error;
 
-    for (n = 0 ; n < def->nfss ; n++)
+    for (n = 0; n < def->nfss; n++)
         if (virDomainFSDefFormat(buf, def->fss[n], flags) < 0)
             goto error;
 
-    for (n = 0 ; n < def->nnets ; n++)
+    for (n = 0; n < def->nnets; n++)
         if (virDomainNetDefFormat(buf, def->nets[n], flags) < 0)
             goto error;
 
-    for (n = 0 ; n < def->nsmartcards ; n++)
+    for (n = 0; n < def->nsmartcards; n++)
         if (virDomainSmartcardDefFormat(buf, def->smartcards[n], flags) < 0)
             goto error;
 
-    for (n = 0 ; n < def->nserials ; n++)
+    for (n = 0; n < def->nserials; n++)
         if (virDomainChrDefFormat(buf, def->serials[n], flags) < 0)
             goto error;
 
-    for (n = 0 ; n < def->nparallels ; n++)
+    for (n = 0; n < def->nparallels; n++)
         if (virDomainChrDefFormat(buf, def->parallels[n], flags) < 0)
             goto error;
 
-    for (n = 0 ; n < def->nconsoles ; n++) {
+    for (n = 0; n < def->nconsoles; n++) {
         virDomainChrDef console;
         /* Back compat, ignore the console element for hvm guests
          * if it is type == serial
@@ -16160,11 +16160,11 @@ virDomainDefFormatInternal(virDomainDefPtr def,
             goto error;
     }
 
-    for (n = 0 ; n < def->nchannels ; n++)
+    for (n = 0; n < def->nchannels; n++)
         if (virDomainChrDefFormat(buf, def->channels[n], flags) < 0)
             goto error;
 
-    for (n = 0 ; n < def->ninputs ; n++)
+    for (n = 0; n < def->ninputs; n++)
         if (def->inputs[n]->bus == VIR_DOMAIN_INPUT_BUS_USB &&
             virDomainInputDefFormat(buf, def->inputs[n], flags) < 0)
             goto error;
@@ -16186,20 +16186,20 @@ virDomainDefFormatInternal(virDomainDefPtr def,
         if (virDomainInputDefFormat(buf, &autoInput, flags) < 0)
             goto error;
 
-        for (n = 0 ; n < def->ngraphics ; n++)
+        for (n = 0; n < def->ngraphics; n++)
             if (virDomainGraphicsDefFormat(buf, def->graphics[n], flags) < 0)
                 goto error;
     }
 
-    for (n = 0 ; n < def->nsounds ; n++)
+    for (n = 0; n < def->nsounds; n++)
         if (virDomainSoundDefFormat(buf, def->sounds[n], flags) < 0)
             goto error;
 
-    for (n = 0 ; n < def->nvideos ; n++)
+    for (n = 0; n < def->nvideos; n++)
         if (virDomainVideoDefFormat(buf, def->videos[n], flags) < 0)
             goto error;
 
-    for (n = 0 ; n < def->nhostdevs ; n++) {
+    for (n = 0; n < def->nhostdevs; n++) {
         /* If parent.type != NONE, this is just a pointer to the
          * hostdev in a higher-level device (e.g. virDomainNetDef),
          * and will have already been formatted there.
@@ -16210,14 +16210,14 @@ virDomainDefFormatInternal(virDomainDefPtr def,
         }
     }
 
-    for (n = 0 ; n < def->nredirdevs ; n++)
+    for (n = 0; n < def->nredirdevs; n++)
         if (virDomainRedirdevDefFormat(buf, def->redirdevs[n], flags) < 0)
             goto error;
 
     if (def->redirfilter)
         virDomainRedirFilterDefFormat(buf, def->redirfilter);
 
-    for (n = 0 ; n < def->nhubs ; n++)
+    for (n = 0; n < def->nhubs; n++)
         if (virDomainHubDefFormat(buf, def->hubs[n], flags) < 0)
             goto error;
 
@@ -16288,7 +16288,7 @@ virDomainObjFormat(virDomainXMLOptionPtr xmlopt,
                       virDomainStateReasonToString(state, reason),
                       (long long)obj->pid);
 
-    for (i = 0 ; i < VIR_DOMAIN_TAINT_LAST ; i++) {
+    for (i = 0; i < VIR_DOMAIN_TAINT_LAST; i++) {
         if (obj->taint & (1 << i))
             virBufferAsprintf(&buf, "  <taint flag='%s'/>\n",
                               virDomainTaintTypeToString(i));
@@ -16699,7 +16699,7 @@ virDomainGetRootFilesystem(virDomainDefPtr def)
 {
     int i;
 
-    for (i = 0 ; i < def->nfss ; i++) {
+    for (i = 0; i < def->nfss; i++) {
         if (STREQ(def->fss[i]->dst, "/"))
             return def->fss[i];
     }
@@ -16819,7 +16819,7 @@ virDomainObjListGetInactiveNames(virDomainObjListPtr doms,
     virHashForEach(doms->objs, virDomainObjListCopyInactiveNames, &data);
     virObjectUnlock(doms);
     if (data.oom) {
-        for (i = 0 ; i < data.numnames ; i++)
+        for (i = 0; i < data.numnames; i++)
             VIR_FREE(data.names[i]);
         virReportOOMError();
         return -1;
@@ -16870,7 +16870,7 @@ virDomainChrDefForeach(virDomainDefPtr def,
     int i;
     int rc = 0;
 
-    for (i = 0 ; i < def->nserials ; i++) {
+    for (i = 0; i < def->nserials; i++) {
         if ((iter)(def,
                    def->serials[i],
                    opaque) < 0)
@@ -16880,7 +16880,7 @@ virDomainChrDefForeach(virDomainDefPtr def,
             goto done;
     }
 
-    for (i = 0 ; i < def->nparallels ; i++) {
+    for (i = 0; i < def->nparallels; i++) {
         if ((iter)(def,
                    def->parallels[i],
                    opaque) < 0)
@@ -16890,7 +16890,7 @@ virDomainChrDefForeach(virDomainDefPtr def,
             goto done;
     }
 
-    for (i = 0 ; i < def->nchannels ; i++) {
+    for (i = 0; i < def->nchannels; i++) {
         if ((iter)(def,
                    def->channels[i],
                    opaque) < 0)
@@ -16899,7 +16899,7 @@ virDomainChrDefForeach(virDomainDefPtr def,
         if (abortOnError && rc != 0)
             goto done;
     }
-    for (i = 0 ; i < def->nconsoles ; i++) {
+    for (i = 0; i < def->nconsoles; i++) {
         if ((iter)(def,
                    def->consoles[i],
                    opaque) < 0)
@@ -16923,7 +16923,7 @@ virDomainSmartcardDefForeach(virDomainDefPtr def,
     int i;
     int rc = 0;
 
-    for (i = 0 ; i < def->nsmartcards ; i++) {
+    for (i = 0; i < def->nsmartcards; i++) {
         if ((iter)(def,
                    def->smartcards[i],
                    opaque) < 0)
diff --git a/src/conf/domain_event.c b/src/conf/domain_event.c
index 825012a..ad23f8e 100644
--- a/src/conf/domain_event.c
+++ b/src/conf/domain_event.c
@@ -162,7 +162,7 @@ virDomainEventCallbackListRemove(virConnectPtr conn,
 {
     int ret = 0;
     int i;
-    for (i = 0 ; i < cbList->count ; i++) {
+    for (i = 0; i < cbList->count; i++) {
         if (cbList->callbacks[i]->cb == VIR_DOMAIN_EVENT_CALLBACK(callback) &&
             cbList->callbacks[i]->eventID == VIR_DOMAIN_EVENT_ID_LIFECYCLE &&
             cbList->callbacks[i]->conn == conn) {
@@ -184,7 +184,7 @@ virDomainEventCallbackListRemove(virConnectPtr conn,
             }
             cbList->count--;
 
-            for (i = 0 ; i < cbList->count ; i++) {
+            for (i = 0; i < cbList->count; i++) {
                 if (!cbList->callbacks[i]->deleted)
                     ret++;
             }
@@ -213,7 +213,7 @@ virDomainEventCallbackListRemoveID(virConnectPtr conn,
 {
     int ret = 0;
     int i;
-    for (i = 0 ; i < cbList->count ; i++) {
+    for (i = 0; i < cbList->count; i++) {
         if (cbList->callbacks[i]->callbackID == callbackID &&
             cbList->callbacks[i]->conn == conn) {
             virFreeCallback freecb = cbList->callbacks[i]->freecb;
@@ -234,7 +234,7 @@ virDomainEventCallbackListRemoveID(virConnectPtr conn,
             }
             cbList->count--;
 
-            for (i = 0 ; i < cbList->count ; i++) {
+            for (i = 0; i < cbList->count; i++) {
                 if (!cbList->callbacks[i]->deleted)
                     ret++;
             }
@@ -255,12 +255,12 @@ virDomainEventCallbackListMarkDelete(virConnectPtr conn,
 {
     int ret = 0;
     int i;
-    for (i = 0 ; i < cbList->count ; i++) {
+    for (i = 0; i < cbList->count; i++) {
         if (cbList->callbacks[i]->cb == VIR_DOMAIN_EVENT_CALLBACK(callback) &&
             cbList->callbacks[i]->eventID == VIR_DOMAIN_EVENT_ID_LIFECYCLE &&
             cbList->callbacks[i]->conn == conn) {
             cbList->callbacks[i]->deleted = 1;
-            for (i = 0 ; i < cbList->count ; i++) {
+            for (i = 0; i < cbList->count; i++) {
                 if (!cbList->callbacks[i]->deleted)
                     ret++;
             }
@@ -281,11 +281,11 @@ virDomainEventCallbackListMarkDeleteID(virConnectPtr conn,
 {
     int ret = 0;
     int i;
-    for (i = 0 ; i < cbList->count ; i++) {
+    for (i = 0; i < cbList->count; i++) {
         if (cbList->callbacks[i]->callbackID == callbackID &&
             cbList->callbacks[i]->conn == conn) {
             cbList->callbacks[i]->deleted = 1;
-            for (i = 0 ; i < cbList->count ; i++) {
+            for (i = 0; i < cbList->count; i++) {
                 if (!cbList->callbacks[i]->deleted)
                     ret++;
             }
@@ -304,7 +304,7 @@ virDomainEventCallbackListPurgeMarked(virDomainEventCallbackListPtr cbList)
 {
     int old_count = cbList->count;
     int i;
-    for (i = 0 ; i < cbList->count ; i++) {
+    for (i = 0; i < cbList->count; i++) {
         if (cbList->callbacks[i]->deleted) {
             virFreeCallback freecb = cbList->callbacks[i]->freecb;
             if (freecb)
@@ -360,7 +360,7 @@ virDomainEventCallbackListAddID(virConnectPtr conn,
     }
 
     /* check if we already have this callback on our list */
-    for (i = 0 ; i < cbList->count ; i++) {
+    for (i = 0; i < cbList->count; i++) {
         if (cbList->callbacks[i]->cb == VIR_DOMAIN_EVENT_CALLBACK(callback) &&
             cbList->callbacks[i]->eventID == eventID &&
             cbList->callbacks[i]->conn == conn &&
@@ -402,7 +402,7 @@ virDomainEventCallbackListAddID(virConnectPtr conn,
 
     event->callbackID = cbList->nextID++;
 
-    for (i = 0 ; i < cbList->count ; i++) {
+    for (i = 0; i < cbList->count; i++) {
         if (cbList->callbacks[i]->eventID == eventID &&
             cbList->callbacks[i]->conn == conn &&
             !cbList->callbacks[i]->deleted)
@@ -458,7 +458,7 @@ virDomainEventCallbackListEventID(virConnectPtr conn,
 {
     int i;
 
-    for (i = 0 ; i < cbList->count ; i++) {
+    for (i = 0; i < cbList->count; i++) {
         if (cbList->callbacks[i]->deleted)
             continue;
 
@@ -498,7 +498,7 @@ void virDomainEventFree(virDomainEventPtr event)
         VIR_FREE(event->data.graphics.authScheme);
         if (event->data.graphics.subject) {
             int i;
-            for (i = 0 ; i < event->data.graphics.subject->nidentity ; i++) {
+            for (i = 0; i < event->data.graphics.subject->nidentity; i++) {
                 VIR_FREE(event->data.graphics.subject->identities[i].type);
                 VIR_FREE(event->data.graphics.subject->identities[i].name);
             }
@@ -537,7 +537,7 @@ virDomainEventQueueClear(virDomainEventQueuePtr queue)
     if (!queue)
         return;
 
-    for (i = 0; i < queue->count ; i++) {
+    for (i = 0; i < queue->count; i++) {
         virDomainEventFree(queue->events[i]);
     }
     VIR_FREE(queue->events);
@@ -1370,7 +1370,7 @@ virDomainEventDispatch(virDomainEventPtr event,
        to have any removed */
     int cbCount = callbacks->count;
 
-    for (i = 0 ; i < cbCount ; i++) {
+    for (i = 0; i < cbCount; i++) {
         if (!virDomainEventDispatchMatchCallback(event, callbacks->callbacks[i]))
             continue;
 
@@ -1391,7 +1391,7 @@ virDomainEventQueueDispatch(virDomainEventQueuePtr queue,
 {
     int i;
 
-    for (i = 0 ; i < queue->count ; i++) {
+    for (i = 0; i < queue->count; i++) {
         virDomainEventDispatch(queue->events[i], callbacks, dispatch, opaque);
         virDomainEventFree(queue->events[i]);
     }
diff --git a/src/conf/interface_conf.c b/src/conf/interface_conf.c
index fd3c292..d8100ed 100644
--- a/src/conf/interface_conf.c
+++ b/src/conf/interface_conf.c
@@ -1171,7 +1171,7 @@ int virInterfaceFindByMACString(const virInterfaceObjListPtr interfaces,
 {
     unsigned int i, matchct = 0;
 
-    for (i = 0 ; i < interfaces->count ; i++) {
+    for (i = 0; i < interfaces->count; i++) {
 
         virInterfaceObjLock(interfaces->objs[i]);
         if (STRCASEEQ(interfaces->objs[i]->def->mac, mac)) {
@@ -1195,7 +1195,7 @@ virInterfaceObjPtr virInterfaceFindByName(const virInterfaceObjListPtr
 {
     unsigned int i;
 
-    for (i = 0 ; i < interfaces->count ; i++) {
+    for (i = 0; i < interfaces->count; i++) {
         virInterfaceObjLock(interfaces->objs[i]);
         if (STREQ(interfaces->objs[i]->def->name, name))
             return interfaces->objs[i];
@@ -1209,7 +1209,7 @@ void virInterfaceObjListFree(virInterfaceObjListPtr interfaces)
 {
     unsigned int i;
 
-    for (i = 0 ; i < interfaces->count ; i++)
+    for (i = 0; i < interfaces->count; i++)
         virInterfaceObjFree(interfaces->objs[i]);
 
     VIR_FREE(interfaces->objs);
@@ -1298,7 +1298,7 @@ void virInterfaceRemove(virInterfaceObjListPtr interfaces,
     unsigned int i;
 
     virInterfaceObjUnlock(iface);
-    for (i = 0 ; i < interfaces->count ; i++) {
+    for (i = 0; i < interfaces->count; i++) {
         virInterfaceObjLock(interfaces->objs[i]);
         if (interfaces->objs[i] == iface) {
             virInterfaceObjUnlock(interfaces->objs[i]);
diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c
index eb10c0a..8cddcc2 100644
--- a/src/conf/network_conf.c
+++ b/src/conf/network_conf.c
@@ -71,7 +71,7 @@ virNetworkObjPtr virNetworkFindByUUID(const virNetworkObjListPtr nets,
 {
     unsigned int i;
 
-    for (i = 0 ; i < nets->count ; i++) {
+    for (i = 0; i < nets->count; i++) {
         virNetworkObjLock(nets->objs[i]);
         if (!memcmp(nets->objs[i]->def->uuid, uuid, VIR_UUID_BUFLEN))
             return nets->objs[i];
@@ -86,7 +86,7 @@ virNetworkObjPtr virNetworkFindByName(const virNetworkObjListPtr nets,
 {
     unsigned int i;
 
-    for (i = 0 ; i < nets->count ; i++) {
+    for (i = 0; i < nets->count; i++) {
         virNetworkObjLock(nets->objs[i]);
         if (STREQ(nets->objs[i]->def->name, name))
             return nets->objs[i];
@@ -197,12 +197,12 @@ virNetworkForwardDefClear(virNetworkForwardDefPtr def)
 {
     int ii;
 
-    for (ii = 0 ; ii < def->npfs && def->pfs ; ii++) {
+    for (ii = 0; ii < def->npfs && def->pfs; ii++) {
         virNetworkForwardPfDefClear(&def->pfs[ii]);
     }
     VIR_FREE(def->pfs);
 
-    for (ii = 0 ; ii < def->nifs && def->ifs ; ii++) {
+    for (ii = 0; ii < def->nifs && def->ifs; ii++) {
         virNetworkForwardIfDefClear(&def->ifs[ii]);
     }
     VIR_FREE(def->ifs);
@@ -222,12 +222,12 @@ virNetworkDefFree(virNetworkDefPtr def)
 
     virNetworkForwardDefClear(&def->forward);
 
-    for (ii = 0 ; ii < def->nips && def->ips ; ii++) {
+    for (ii = 0; ii < def->nips && def->ips; ii++) {
         virNetworkIpDefClear(&def->ips[ii]);
     }
     VIR_FREE(def->ips);
 
-    for (ii = 0 ; ii < def->nroutes && def->routes ; ii++) {
+    for (ii = 0; ii < def->nroutes && def->routes; ii++) {
         virNetworkRouteDefClear(&def->routes[ii]);
     }
     VIR_FREE(def->routes);
@@ -264,7 +264,7 @@ void virNetworkObjListFree(virNetworkObjListPtr nets)
 {
     unsigned int i;
 
-    for (i = 0 ; i < nets->count ; i++)
+    for (i = 0; i < nets->count; i++)
         virNetworkObjFree(nets->objs[i]);
 
     VIR_FREE(nets->objs);
@@ -548,7 +548,7 @@ void virNetworkRemoveInactive(virNetworkObjListPtr nets,
     unsigned int i;
 
     virNetworkObjUnlock(net);
-    for (i = 0 ; i < nets->count ; i++) {
+    for (i = 0; i < nets->count; i++) {
         virNetworkObjLock(nets->objs[i]);
         if (nets->objs[i] == net) {
             virNetworkObjUnlock(nets->objs[i]);
@@ -2291,13 +2291,13 @@ virNetworkDNSDefFormat(virBufferPtr buf,
     virBufferAddLit(buf, "<dns>\n");
     virBufferAdjustIndent(buf, 2);
 
-    for (i = 0 ; i < def->ntxts ; i++) {
+    for (i = 0; i < def->ntxts; i++) {
         virBufferAsprintf(buf, "<txt name='%s' value='%s' />\n",
                               def->txts[i].name,
                               def->txts[i].value);
     }
 
-    for (i = 0 ; i < def->nsrvs ; i++) {
+    for (i = 0; i < def->nsrvs; i++) {
         if (def->srvs[i].service && def->srvs[i].protocol) {
             virBufferAsprintf(buf, "<srv service='%s' protocol='%s'",
                                   def->srvs[i].service,
@@ -2321,7 +2321,7 @@ virNetworkDNSDefFormat(virBufferPtr buf,
     if (def->nhosts) {
         int ii, j;
 
-        for (ii = 0 ; ii < def->nhosts; ii++) {
+        for (ii = 0; ii < def->nhosts; ii++) {
             char *ip = virSocketAddrFormat(&def->hosts[ii].ip);
 
             virBufferAsprintf(buf, "<host ip='%s'>\n", ip);
@@ -2381,7 +2381,7 @@ virNetworkIpDefFormat(virBufferPtr buf,
         virBufferAddLit(buf, "<dhcp>\n");
         virBufferAdjustIndent(buf, 2);
 
-        for (ii = 0 ; ii < def->nranges ; ii++) {
+        for (ii = 0; ii < def->nranges; ii++) {
             char *saddr = virSocketAddrFormat(&def->ranges[ii].start);
             if (!saddr)
                 goto error;
@@ -2395,7 +2395,7 @@ virNetworkIpDefFormat(virBufferPtr buf,
             VIR_FREE(saddr);
             VIR_FREE(eaddr);
         }
-        for (ii = 0 ; ii < def->nhosts ; ii++) {
+        for (ii = 0; ii < def->nhosts; ii++) {
             virBufferAddLit(buf, "<host ");
             if (def->hosts[ii].mac)
                 virBufferAsprintf(buf, "mac='%s' ", def->hosts[ii].mac);
@@ -3136,7 +3136,7 @@ int virNetworkBridgeInUse(const virNetworkObjListPtr nets,
     unsigned int i;
     unsigned int ret = 0;
 
-    for (i = 0 ; i < nets->count ; i++) {
+    for (i = 0; i < nets->count; i++) {
         virNetworkObjLock(nets->objs[i]);
         if (nets->objs[i]->def->bridge &&
             STREQ(nets->objs[i]->def->bridge, bridge) &&
diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c
index f9303c1..4e0c6e2 100644
--- a/src/conf/node_device_conf.c
+++ b/src/conf/node_device_conf.c
@@ -156,7 +156,7 @@ void virNodeDeviceObjFree(virNodeDeviceObjPtr dev)
 void virNodeDeviceObjListFree(virNodeDeviceObjListPtr devs)
 {
     unsigned int i;
-    for (i = 0 ; i < devs->count ; i++)
+    for (i = 0; i < devs->count; i++)
         virNodeDeviceObjFree(devs->objs[i]);
     VIR_FREE(devs->objs);
     devs->count = 0;
@@ -317,7 +317,7 @@ char *virNodeDeviceDefFormat(const virNodeDeviceDefPtr def)
             }
             if (data->pci_dev.flags & VIR_NODE_DEV_CAP_FLAG_PCI_VIRTUAL_FUNCTION) {
                 virBufferAddLit(&buf, "    <capability type='virt_functions'>\n");
-                for (i = 0 ; i < data->pci_dev.num_virtual_functions ; i++) {
+                for (i = 0; i < data->pci_dev.num_virtual_functions; i++) {
                     virBufferAsprintf(&buf,
                                       "      <address domain='0x%.4x' bus='0x%.2x' "
                                       "slot='0x%.2x' function='0x%.1x'/>\n",
@@ -571,7 +571,7 @@ virNodeDevCapStorageParseXML(xmlXPathContextPtr ctxt,
         goto out;
     }
 
-    for (i = 0 ; i < n ; i++) {
+    for (i = 0; i < n; i++) {
         char *type = virXMLPropString(nodes[i], "type");
 
         if (!type) {
@@ -734,7 +734,7 @@ virNodeDevCapScsiHostParseXML(xmlXPathContextPtr ctxt,
         goto out;
     }
 
-    for (i = 0 ; i < n ; i++) {
+    for (i = 0; i < n; i++) {
         type = virXMLPropString(nodes[i], "type");
 
         if (!type) {
@@ -1189,7 +1189,7 @@ virNodeDeviceDefParseXML(xmlXPathContextPtr ctxt,
     }
 
     next_cap = &def->caps;
-    for (i = 0 ; i < n ; i++) {
+    for (i = 0; i < n; i++) {
         *next_cap = virNodeDevCapsDefParseXML(ctxt, def,
                                               nodes[i],
                                               create,
@@ -1380,7 +1380,7 @@ void virNodeDevCapsDefFree(virNodeDevCapsDefPtr caps)
         VIR_FREE(data->pci_dev.product_name);
         VIR_FREE(data->pci_dev.vendor_name);
         VIR_FREE(data->pci_dev.physical_function);
-        for (i = 0 ; i < data->pci_dev.num_virtual_functions ; i++) {
+        for (i = 0; i < data->pci_dev.num_virtual_functions; i++) {
             VIR_FREE(data->pci_dev.virtual_functions[i]);
         }
         break;
diff --git a/src/conf/nwfilter_conf.c b/src/conf/nwfilter_conf.c
index 08222de..817c9c9 100644
--- a/src/conf/nwfilter_conf.c
+++ b/src/conf/nwfilter_conf.c
@@ -349,7 +349,7 @@ void
 virNWFilterObjListFree(virNWFilterObjListPtr nwfilters)
 {
     unsigned int i;
-    for (i = 0 ; i < nwfilters->count ; i++)
+    for (i = 0; i < nwfilters->count; i++)
         virNWFilterObjFree(nwfilters->objs[i]);
     VIR_FREE(nwfilters->objs);
     nwfilters->count = 0;
@@ -421,7 +421,7 @@ virNWFilterObjRemove(virNWFilterObjListPtr nwfilters,
 
     virNWFilterObjUnlock(nwfilter);
 
-    for (i = 0 ; i < nwfilters->count ; i++) {
+    for (i = 0; i < nwfilters->count; i++) {
         virNWFilterObjLock(nwfilters->objs[i]);
         if (nwfilters->objs[i] == nwfilter) {
             virNWFilterObjUnlock(nwfilters->objs[i]);
@@ -2688,7 +2688,7 @@ virNWFilterObjFindByUUID(virNWFilterObjListPtr nwfilters,
 {
     unsigned int i;
 
-    for (i = 0 ; i < nwfilters->count ; i++) {
+    for (i = 0; i < nwfilters->count; i++) {
         virNWFilterObjLock(nwfilters->objs[i]);
         if (!memcmp(nwfilters->objs[i]->def->uuid, uuid, VIR_UUID_BUFLEN))
             return nwfilters->objs[i];
@@ -2704,7 +2704,7 @@ virNWFilterObjFindByName(virNWFilterObjListPtr nwfilters, const char *name)
 {
     unsigned int i;
 
-    for (i = 0 ; i < nwfilters->count ; i++) {
+    for (i = 0; i < nwfilters->count; i++) {
         virNWFilterObjLock(nwfilters->objs[i]);
         if (STREQ(nwfilters->objs[i]->def->name, name))
             return nwfilters->objs[i];
diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c
index 8fa805b..6cb98bf 100644
--- a/src/conf/storage_conf.c
+++ b/src/conf/storage_conf.c
@@ -404,7 +404,7 @@ void
 virStoragePoolObjListFree(virStoragePoolObjListPtr pools)
 {
     unsigned int i;
-    for (i = 0 ; i < pools->count ; i++)
+    for (i = 0; i < pools->count; i++)
         virStoragePoolObjFree(pools->objs[i]);
     VIR_FREE(pools->objs);
     pools->count = 0;
@@ -591,7 +591,7 @@ virStoragePoolDefParseSource(xmlXPathContextPtr ctxt,
             goto cleanup;
         }
 
-        for (i = 0 ; i < nsource ; i++) {
+        for (i = 0; i < nsource; i++) {
             char *path = virXMLPropString(nodeset[i], "path");
             if (path == NULL) {
                 VIR_FREE(nodeset);
@@ -1558,7 +1558,7 @@ virStoragePoolObjFindByName(virStoragePoolObjListPtr pools,
 {
     unsigned int i;
 
-    for (i = 0 ; i < pools->count ; i++) {
+    for (i = 0; i < pools->count; i++) {
         virStoragePoolObjLock(pools->objs[i]);
         if (STREQ(pools->objs[i]->def->name, name))
             return pools->objs[i];
@@ -1614,7 +1614,7 @@ virStorageVolDefFindByPath(virStoragePoolObjPtr pool,
 {
     unsigned int i;
 
-    for (i = 0 ; i < pool->volumes.count ; i++)
+    for (i = 0; i < pool->volumes.count; i++)
         if (STREQ(pool->volumes.objs[i]->target.path, path))
             return pool->volumes.objs[i];
 
-- 
1.8.1.4


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