]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
maint: fix comma style issues: tests, tools
authorEric Blake <eblake@redhat.com>
Tue, 19 Nov 2013 22:50:56 +0000 (15:50 -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.

* tests/sysinfotest.c: Consistently use commas.
* tests/viratomictest.c: Likewise.
* tests/vircgroupmock.c: Likewise.
* tools/virsh-domain.c: Likewise.
* tools/virsh-volume.c: Likewise.

Signed-off-by: Eric Blake <eblake@redhat.com>
tests/sysinfotest.c
tests/viratomictest.c
tests/vircgroupmock.c
tools/virsh-domain.c
tools/virsh-volume.c

index 6d287b1c7e3a94c25c90d7d5ff09110c4960da88..83577012b87e199c050d3be12e16ba792dd4012a 100644 (file)
@@ -1,6 +1,7 @@
 /*
  * sysinfotest.c: Testcase(s) for virSysinfoRead
  *
+ * Copyright (C) 2013 Red Hat, Inc.
  * Copyright IBM Corp. 2012
  *
  * This library is free software; you can redistribute it and/or
@@ -75,7 +76,7 @@ testSysinfo(const void *data)
         goto cleanup;
     }
 
-    if (virSysinfoFormat(&buf,ret) < 0)
+    if (virSysinfoFormat(&buf, ret) < 0)
         goto cleanup;
 
     if (!(sysfsActualData = virBufferCurrentContent(&buf)))
index d092b95b15a284fc3da8c26bda1362149c1e6685..49dd388332d16f72f5bf103f94ffa429aa5ee7c2 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011-2012 Red Hat, Inc.
+ * Copyright (C) 2011-2013 Red Hat, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -123,7 +123,7 @@ thread_func(void *data)
         bucket[idx] += d;
         virAtomicIntAdd(&atomic, d);
 #ifdef WIN32
-        SleepEx(0,0);
+        SleepEx(0, 0);
 #else
         sched_yield();
 #endif
index 3167a5ced3d53cffddccdb3cd0a612f4ef2ff44a..6542973f8864998e08a96e7b45032914dd4a64ac 100644 (file)
@@ -399,7 +399,7 @@ static void init_sysfs(void)
 # define MAKE_CONTROLLER(subpath)                               \
     do {                                                        \
         char *path;                                             \
-        if (asprintf(&path,"%s/%s", fakesysfsdir, subpath) < 0) \
+        if (asprintf(&path, "%s/%s", fakesysfsdir, subpath) < 0)\
             abort();                                            \
         if (make_controller(path, 0755) < 0) {                  \
             fprintf(stderr, "Cannot initialize %s\n", path);    \
index 60abd3da9d696c61fe11fc6ca9223c6e25bc9783..1fe138c5b49b5a585d809de97526c4d9509bfdd4 100644 (file)
@@ -2568,7 +2568,7 @@ cmdDomIftune(vshControl *ctl, const vshCmd *cmd)
         goto cleanup;
 
     if (vshCommandOptStringReq(ctl, cmd, "inbound", &inboundStr) < 0 ||
-        vshCommandOptStringReq(ctl,cmd, "outbound", &outboundStr) < 0)
+        vshCommandOptStringReq(ctl, cmd, "outbound", &outboundStr) < 0)
         goto cleanup;
 
     memset(&inbound, 0, sizeof(inbound));
index 55a99d00f7d926b3ce8cd2cddab6ea3747521f83..cbdb3f0fa2265300c4fafe1c52ffff08b6d38c15 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * virsh-volume.c: Commands to manage storage volume
  *
- * Copyright (C) 2005, 2007-2012 Red Hat, Inc.
+ * Copyright (C) 2005, 2007-2013 Red Hat, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -211,7 +211,7 @@ cmdVolCreateAs(vshControl *ctl, const vshCmd *cmd)
 
     if (format) {
         virBufferAddLit(&buf, "  <target>\n");
-        virBufferAsprintf(&buf, "    <format type='%s'/>\n",format);
+        virBufferAsprintf(&buf, "    <format type='%s'/>\n", format);
         virBufferAddLit(&buf, "  </target>\n");
     }
 
@@ -265,9 +265,10 @@ cmdVolCreateAs(vshControl *ctl, const vshCmd *cmd)
 
         /* Create XML for the backing store */
         virBufferAddLit(&buf, "  <backingStore>\n");
-        virBufferAsprintf(&buf, "    <path>%s</path>\n",snapshotStrVolPath);
+        virBufferAsprintf(&buf, "    <path>%s</path>\n", snapshotStrVolPath);
         if (snapshotStrFormat)
-            virBufferAsprintf(&buf, "    <format type='%s'/>\n",snapshotStrFormat);
+            virBufferAsprintf(&buf, "    <format type='%s'/>\n",
+                              snapshotStrFormat);
         virBufferAddLit(&buf, "  </backingStore>\n");
 
         /* Cleanup snapshot allocations */