]> xenbits.xensource.com Git - libvirt.git/commitdiff
Fri Feb 20 18:25:42 IST 2007 Mark McLoughlin <markmc@redhat.com>
authorMark McLoughlin <markmc@redhat.com>
Tue, 20 Feb 2007 18:25:46 +0000 (18:25 +0000)
committerMark McLoughlin <markmc@redhat.com>
Tue, 20 Feb 2007 18:25:46 +0000 (18:25 +0000)
        * virsh.c: cmdNetworkList() re-indent this.

ChangeLog
src/virsh.c

index 308a8c634010ed3e34bc18d25a8e6d1b381cc5c2..26980c3df0029d2e6aff191f263c1bc133cfc817 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Fri Feb 20 18:25:42 IST 2007 Mark McLoughlin <markmc@redhat.com>
+
+       * virsh.c: cmdNetworkList() re-indent this.
+       
 Fri Feb 20 17:49:22 IST 2007 Mark McLoughlin <markmc@redhat.com>
 
        Fix a few leaks
index 05e24b2b440c991e2ecba603476040ad136dc337..2504cbf0e49e9795fe39b6fd31cdba4a51178fd7 100644 (file)
@@ -1856,44 +1856,44 @@ cmdNetworkList(vshControl * ctl, vshCmd * cmd ATTRIBUTE_UNUSED)
         return FALSE;
 
     if (active) {
-      maxactive = virConnectNumOfNetworks(ctl->conn);
-      if (maxactive < 0) {
-        vshError(ctl, FALSE, _("Failed to list active networks"));
-        return FALSE;
-      }
-      if (maxactive) {
-        activeNames = vshMalloc(ctl, sizeof(int) * maxactive);
-
-        if ((maxactive = virConnectListNetworks(ctl->conn, &activeNames[0], maxactive)) < 0) {
-         vshError(ctl, FALSE, _("Failed to list active networks"));
-         free(activeNames);
-         return FALSE;
+        maxactive = virConnectNumOfNetworks(ctl->conn);
+        if (maxactive < 0) {
+            vshError(ctl, FALSE, _("Failed to list active networks"));
+            return FALSE;
         }
+        if (maxactive) {
+            activeNames = vshMalloc(ctl, sizeof(int) * maxactive);
+
+            if ((maxactive = virConnectListNetworks(ctl->conn, &activeNames[0], maxactive)) < 0) {
+                vshError(ctl, FALSE, _("Failed to list active networks"));
+                free(activeNames);
+                return FALSE;
+            }
 
-       qsort(&activeNames[0], maxactive, sizeof(int), namesorter);
-      }
+            qsort(&activeNames[0], maxactive, sizeof(int), namesorter);
+        }
     }
     if (inactive) {
-      maxinactive = virConnectNumOfDefinedNetworks(ctl->conn);
-      if (maxinactive < 0) {
-        vshError(ctl, FALSE, _("Failed to list inactive networks"));
-       if (activeNames)
-         free(activeNames);
-        return FALSE;
-      }
-      if (maxinactive) {
-        inactiveNames = vshMalloc(ctl, sizeof(char *) * maxinactive);
-
-        if ((maxinactive = virConnectListDefinedNetworks(ctl->conn, inactiveNames, maxinactive)) < 0) {
-         vshError(ctl, FALSE, _("Failed to list inactive networks"));
-         if (activeNames)
-           free(activeNames);
-         free(inactiveNames);
-         return FALSE;
+        maxinactive = virConnectNumOfDefinedNetworks(ctl->conn);
+        if (maxinactive < 0) {
+            vshError(ctl, FALSE, _("Failed to list inactive networks"));
+            if (activeNames)
+                free(activeNames);
+            return FALSE;
         }
+        if (maxinactive) {
+            inactiveNames = vshMalloc(ctl, sizeof(char *) * maxinactive);
+
+            if ((maxinactive = virConnectListDefinedNetworks(ctl->conn, inactiveNames, maxinactive)) < 0) {
+                vshError(ctl, FALSE, _("Failed to list inactive networks"));
+                if (activeNames)
+                    free(activeNames);
+                free(inactiveNames);
+                return FALSE;
+            }
 
-       qsort(&inactiveNames[0], maxinactive, sizeof(char*), namesorter);
-      }
+            qsort(&inactiveNames[0], maxinactive, sizeof(char*), namesorter);
+        }
     }
     vshPrintExtra(ctl, "%-20s\n", _("Name"));
     vshPrintExtra(ctl, "----------------------------------\n");
@@ -1905,7 +1905,7 @@ cmdNetworkList(vshControl * ctl, vshCmd * cmd ATTRIBUTE_UNUSED)
         if (!network) {
             free(activeNames[i]);
             continue;
-       }
+        }
 
         vshPrint(ctl, "%-20s\n",
                  virNetworkGetName(network));
@@ -1919,10 +1919,10 @@ cmdNetworkList(vshControl * ctl, vshCmd * cmd ATTRIBUTE_UNUSED)
         if (!network) {
             free(inactiveNames[i]);
             continue;
-       }
+        }
 
-       vshPrint(ctl, "%-20s\n",
-                inactiveNames[i]);
+        vshPrint(ctl, "%-20s\n",
+                 inactiveNames[i]);
 
         virNetworkFree(network);
         free(inactiveNames[i]);