]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
maint: fix comma style issues: util
authorEric Blake <eblake@redhat.com>
Tue, 19 Nov 2013 23:00:32 +0000 (16:00 -0700)
committerEric Blake <eblake@redhat.com>
Wed, 20 Nov 2013 16:14:55 +0000 (09:14 -0700)
Most of our code base uses space after comma but not before;
fix the remaining uses before adding a syntax check.

* src/util/vircommand.c: Consistently use commas.
* src/util/virlog.c: Likewise.
* src/util/virnetdevbandwidth.c: Likewise.
* src/util/virnetdevmacvlan.c: Likewise.
* src/util/virnetdevvportprofile.c: Likewise.
* src/util/virnetlink.c: Likewise.
* src/util/virpci.c: Likewise.
* src/util/virsysinfo.c: Likewise.
* src/util/virusb.c: Likewise.

Signed-off-by: Eric Blake <eblake@redhat.com>
src/util/vircommand.c
src/util/virlog.c
src/util/virnetdevbandwidth.c
src/util/virnetdevmacvlan.c
src/util/virnetdevvportprofile.c
src/util/virnetlink.c
src/util/virpci.c
src/util/virsysinfo.c
src/util/virusb.c

index 8dcf9e725255823818c79fdfeda136baec6b7881..a52a1ab96b2a147f8e1188cbc0b09011f3ee352c 100644 (file)
@@ -399,8 +399,8 @@ virExec(virCommandPtr cmd)
 {
     pid_t pid;
     int null = -1, fd, openmax;
-    int pipeout[2] = {-1,-1};
-    int pipeerr[2] = {-1,-1};
+    int pipeout[2] = {-1, -1};
+    int pipeerr[2] = {-1, -1};
     int childin = cmd->infd;
     int childout = -1;
     int childerr = -1;
index 5b7e7b06135fe0065af39a4c4c81d9fe02d3cf97..dfb4d6968bbf875ecc538caa69f6e644ae6a9d7b 100644 (file)
@@ -1183,7 +1183,7 @@ virLogOutputToJournald(virLogSource source,
     state.bufs = iov_bufs;
     state.bufs_end = iov_bufs + ARRAY_CARDINALITY(iov_bufs);
 
-    journalAddString(&state ,"MESSAGE", rawstr);
+    journalAddString(&state"MESSAGE", rawstr);
     journalAddInt(&state, "PRIORITY", priority);
     journalAddString(&state, "LIBVIRT_SOURCE",
                      virLogSourceTypeToString(source));
index 317aa219c08ec94080876cf87064c98c446fdda7..ed6a19d7faa3b564e4aa6c184418ebd85305a712 100644 (file)
@@ -167,7 +167,7 @@ virNetDevBandwidthSet(const char *ifname,
         }
         virCommandFree(cmd);
         cmd = virCommandNew(TC);
-        virCommandAddArgList(cmd,"class", "add", "dev", ifname, "parent",
+        virCommandAddArgList(cmd, "class", "add", "dev", ifname, "parent",
                              hierarchical_class ? "1:1" : "1:", "classid",
                              hierarchical_class ? "1:2" : "1:1", "htb",
                              "rate", average, NULL);
@@ -192,7 +192,7 @@ virNetDevBandwidthSet(const char *ifname,
 
         virCommandFree(cmd);
         cmd = virCommandNew(TC);
-        virCommandAddArgList(cmd,"filter", "add", "dev", ifname, "parent",
+        virCommandAddArgList(cmd, "filter", "add", "dev", ifname, "parent",
                              "1:0", "protocol", "ip", "handle", "1", "fw",
                              "flowid", "1", NULL);
 
index 77cbd6dfd5647cc1a6b949515489579fea59feba..e984bf2800cd36f2365e831b74a7d67bb798dc9b 100644 (file)
@@ -332,7 +332,7 @@ int virNetDevMacVLanTapOpen(const char *ifname,
 
     if (fscanf(file, "%d", &ifindex) != 1) {
         virReportSystemError(errno,
-                             "%s",_("cannot determine macvtap's tap device "
+                             "%s", _("cannot determine macvtap's tap device "
                              "interface index"));
         VIR_FORCE_FCLOSE(file);
         return -1;
index b84001ab99773a72edd11ae00d7196a7a4a6d350..c87837c6e09b70de1c4ccaf9187d87edc9c54191 100644 (file)
@@ -841,7 +841,7 @@ virNetDevVPortProfileOpCommon(const char *ifname, int ifindex,
     int rc;
     int src_pid = 0;
     uint32_t dst_pid = 0;
-    struct nlattr *tb[IFLA_MAX + 1] = { NULL , };
+    struct nlattr *tb[IFLA_MAX + 1] = { NULL, };
     int repeats = STATUS_POLL_TIMEOUT_USEC / STATUS_POLL_INTERVL_USEC;
     uint16_t status = 0;
     bool is8021Qbg = (profileId == NULL);
index 901df6e29f22030d387a48d732e1d447c6758d34..ba6c4b5121d083db08ae4474cd4aa93a4c845696 100644 (file)
@@ -660,7 +660,7 @@ addentry:
         virMacAddrSet(&srv->handles[r].macaddr, macaddr);
     else
         virMacAddrSetRaw(&srv->handles[r].macaddr,
-                         (unsigned char[VIR_MAC_BUFLEN]){0,0,0,0,0,0});
+                         (unsigned char[VIR_MAC_BUFLEN]){0, 0, 0, 0, 0, 0});
 
     VIR_DEBUG("added client to loop slot: %d. with macaddr ptr=%p", r, macaddr);
 
index 8a3a4921366c73c5dcea9fa2e82a98f5f4ecfb31..8ec642f37fdde822d7b7c6de9241a31f3e358881 100644 (file)
@@ -374,7 +374,8 @@ virPCIDeviceWrite32(virPCIDevicePtr dev, int cfgfd, unsigned int pos, uint32_t v
     virPCIDeviceWrite(dev, cfgfd, pos, &buf[0], sizeof(buf));
 }
 
-typedef int (*virPCIDeviceIterPredicate)(virPCIDevicePtr , virPCIDevicePtr , void *);
+typedef int (*virPCIDeviceIterPredicate)(virPCIDevicePtr, virPCIDevicePtr,
+                                         void *);
 
 /* Iterate over available PCI devices calling @predicate
  * to compare each one to @dev.
index 1c8cae53403d922bafdfc29ccdeafa4334bae0c7..18f426d86f61880dcea73d1111d0ac80d4aab8dd 100644 (file)
@@ -756,7 +756,7 @@ virSysinfoParseMemory(const char *base, virSysinfoDefPtr ret)
             cur += 9;
             eol = strchr(cur, '\n');
             virSkipSpacesBackwards(cur, &eol);
-            if (eol && VIR_STRNDUP(memory->memory_locator,cur, eol - cur) < 0)
+            if (eol && VIR_STRNDUP(memory->memory_locator, cur, eol - cur) < 0)
                 return -1;
         }
         if ((cur = strstr(base, "Bank Locator: ")) != NULL) {
index e901618dbcb6e603f08c0e67d0f2c4d3e9db181c..3c82200f2570b8bab1e8ec7aa3c0d6258d49e9e1 100644 (file)
@@ -216,7 +216,7 @@ virUSBDeviceFindByVendor(unsigned int vendor,
     virUSBDeviceListPtr list;
     int count;
 
-    if (!(list = virUSBDeviceSearch(vendor, product, 0 , 0,
+    if (!(list = virUSBDeviceSearch(vendor, product, 0, 0,
                                     vroot,
                                     USB_DEVICE_FIND_BY_VENDOR)))
         return -1;