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

[libvirt] [PATCH 29/31] src/*.[ch]: Remove the whitespace before "; "



---
 src/libvirt-lxc.c |  2 +-
 src/libvirt.c     | 10 +++++-----
 src/nodeinfo.c    | 18 +++++++++---------
 3 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/libvirt-lxc.c b/src/libvirt-lxc.c
index 6b4e995..f30b6c3 100644
--- a/src/libvirt-lxc.c
+++ b/src/libvirt-lxc.c
@@ -151,7 +151,7 @@ virDomainLxcEnterNamespace(virDomainPtr domain,
 
     if (virProcessSetNamespaces(nfdlist, fdlist) < 0) {
         if (oldfdlist && noldfdlist) {
-            for (i = 0 ; i < *noldfdlist ; i++) {
+            for (i = 0; i < *noldfdlist; i++) {
                 VIR_FORCE_CLOSE((*oldfdlist)[i]);
             }
             VIR_FREE(*oldfdlist);
diff --git a/src/libvirt.c b/src/libvirt.c
index 4c018ec..b129611 100644
--- a/src/libvirt.c
+++ b/src/libvirt.c
@@ -150,7 +150,7 @@ static int virConnectAuthCallbackDefault(virConnectCredentialPtr cred,
                                          void *cbdata ATTRIBUTE_UNUSED) {
     int i;
 
-    for (i = 0 ; i < ncred ; i++) {
+    for (i = 0; i < ncred; i++) {
         char buf[1024];
         char *bufptr = buf;
         size_t len;
@@ -820,7 +820,7 @@ int virStateInitialize(bool privileged,
     if (virInitialize() < 0)
         return -1;
 
-    for (i = 0 ; i < virStateDriverTabCount ; i++) {
+    for (i = 0; i < virStateDriverTabCount; i++) {
         if (virStateDriverTab[i]->stateInitialize) {
             VIR_DEBUG("Running global init for %s state driver",
                       virStateDriverTab[i]->name);
@@ -846,7 +846,7 @@ int virStateInitialize(bool privileged,
 int virStateCleanup(void) {
     int i, ret = 0;
 
-    for (i = 0 ; i < virStateDriverTabCount ; i++) {
+    for (i = 0; i < virStateDriverTabCount; i++) {
         if (virStateDriverTab[i]->stateCleanup &&
             virStateDriverTab[i]->stateCleanup() < 0)
             ret = -1;
@@ -864,7 +864,7 @@ int virStateCleanup(void) {
 int virStateReload(void) {
     int i, ret = 0;
 
-    for (i = 0 ; i < virStateDriverTabCount ; i++) {
+    for (i = 0; i < virStateDriverTabCount; i++) {
         if (virStateDriverTab[i]->stateReload &&
             virStateDriverTab[i]->stateReload() < 0)
             ret = -1;
@@ -882,7 +882,7 @@ int virStateReload(void) {
 int virStateStop(void) {
     int i, ret = 0;
 
-    for (i = 0 ; i < virStateDriverTabCount ; i++) {
+    for (i = 0; i < virStateDriverTabCount; i++) {
         if (virStateDriverTab[i]->stateStop &&
             virStateDriverTab[i]->stateStop())
             ret = 1;
diff --git a/src/nodeinfo.c b/src/nodeinfo.c
index 7118a0f..d8375ab 100644
--- a/src/nodeinfo.c
+++ b/src/nodeinfo.c
@@ -1478,9 +1478,9 @@ nodeCapsInitNUMAFake(virCapsPtr caps ATTRIBUTE_UNUSED)
     }
 
     id = 0;
-    for (s = 0 ; s < nodeinfo.sockets ; s++) {
-        for (c = 0 ; c < nodeinfo.cores ; c++) {
-            for (t = 0 ; t < nodeinfo.threads ; t++) {
+    for (s = 0; s < nodeinfo.sockets; s++) {
+        for (c = 0; c < nodeinfo.cores; c++) {
+            for (t = 0; t < nodeinfo.threads; t++) {
                 cpus[id].id = id;
                 cpus[id].socket_id = s;
                 cpus[id].core_id = c;
@@ -1502,7 +1502,7 @@ nodeCapsInitNUMAFake(virCapsPtr caps ATTRIBUTE_UNUSED)
     return 0;
 
  error:
-    for (; id >= 0 ; id--)
+    for (; id >= 0; id--)
         virBitmapFree(cpus[id].siblings);
     VIR_FREE(cpus);
     return -1;
@@ -1637,7 +1637,7 @@ nodeCapsInitNUMA(virCapsPtr caps)
         goto cleanup;
     memset(allonesmask, 0xff, mask_n_bytes);
 
-    for (n = 0 ; n <= numa_max_node() ; n++) {
+    for (n = 0; n <= numa_max_node(); n++) {
         int i;
         /* The first time this returns -1, ENOENT if node doesn't exist... */
         if (numa_node_to_cpus(n, mask, mask_n_bytes) < 0) {
@@ -1655,14 +1655,14 @@ nodeCapsInitNUMA(virCapsPtr caps)
         /* Detect the amount of memory in the numa cell */
         memory = nodeGetCellMemory(n);
 
-        for (ncpus = 0, i = 0 ; i < max_n_cpus ; i++)
+        for (ncpus = 0, i = 0; i < max_n_cpus; i++)
             if (MASK_CPU_ISSET(mask, i))
                 ncpus++;
 
         if (VIR_ALLOC_N(cpus, ncpus) < 0)
             goto cleanup;
 
-        for (ncpus = 0, i = 0 ; i < max_n_cpus ; i++) {
+        for (ncpus = 0, i = 0; i < max_n_cpus; i++) {
             if (MASK_CPU_ISSET(mask, i)) {
                 if (virNodeCapsFillCPUInfo(i, cpus + ncpus++) < 0) {
                     topology_failed = true;
@@ -1714,7 +1714,7 @@ nodeGetCellsFreeMemory(unsigned long long *freeMems,
     if (lastCell > maxCell)
         lastCell = maxCell;
 
-    for (numCells = 0, n = startCell ; n <= lastCell ; n++) {
+    for (numCells = 0, n = startCell; n <= lastCell; n++) {
         long long mem;
         if (numa_node_size64(n, &mem) < 0) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
@@ -1740,7 +1740,7 @@ nodeGetFreeMemory(void)
         return nodeGetFreeMemoryFake();
 
 
-    for (n = 0 ; n <= numa_max_node() ; n++) {
+    for (n = 0; n <= numa_max_node(); n++) {
         long long mem;
         if (numa_node_size64(n, &mem) < 0) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-- 
1.8.1.4


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