[PATCH 09/11] maint: fix comma style issues: remaining drivers

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

 



Most of our code base uses space after comma but not before;
fix the remaining uses before adding a syntax check.

* src/lxc/lxc_container.c: Consistently use commas.
* src/openvz/openvz_driver.c: Likewise.
* src/openvz/openvz_util.c: Likewise.
* src/remote/remote_driver.c: Likewise.
* src/test/test_driver.c: Likewise.

Signed-off-by: Eric Blake <eblake@xxxxxxxxxx>
---
 src/lxc/lxc_container.c    |  2 +-
 src/openvz/openvz_driver.c |  4 ++--
 src/openvz/openvz_util.c   |  3 ++-
 src/remote/remote_driver.c |  2 +-
 src/test/test_driver.c     | 12 ++++++------
 5 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/src/lxc/lxc_container.c b/src/lxc/lxc_container.c
index 2bdf957..2059b83 100644
--- a/src/lxc/lxc_container.c
+++ b/src/lxc/lxc_container.c
@@ -483,7 +483,7 @@ error_out:


 /*_syscall2(int, pivot_root, char *, newroot, const char *, oldroot)*/
-extern int pivot_root(const char * new_root,const char * put_old);
+extern int pivot_root(const char * new_root, const char * put_old);

 static int lxcContainerChildMountSort(const void *a, const void *b)
 {
diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c
index df55568..aee7390 100644
--- a/src/openvz/openvz_driver.c
+++ b/src/openvz/openvz_driver.c
@@ -1280,7 +1280,7 @@ openvzDomainGetAutostart(virDomainPtr dom, int *autostart)
     }

     *autostart = 0;
-    if (STREQ(value,"yes"))
+    if (STREQ(value, "yes"))
         *autostart = 1;
     ret = 0;

@@ -1523,7 +1523,7 @@ static int openvzConnectListDomains(virConnectPtr conn ATTRIBUTE_UNUSED,
     int ret;
     char buf[32];
     char *endptr;
-    virCommandPtr cmd = virCommandNewArgList(VZLIST, "-ovpsid", "-H" , NULL);
+    virCommandPtr cmd = virCommandNewArgList(VZLIST, "-ovpsid", "-H", NULL);

     virCommandSetOutputFD(cmd, &outfd);
     if (virCommandRunAsync(cmd, NULL) < 0)
diff --git a/src/openvz/openvz_util.c b/src/openvz/openvz_util.c
index dc69df2..8920d14 100644
--- a/src/openvz/openvz_util.c
+++ b/src/openvz/openvz_util.c
@@ -1,6 +1,7 @@
 /*
  * openvz_driver.c: core driver methods for managing OpenVZ VEs
  *
+ * Copyright (C) 2013 Red Hat, Inc.
  * Copyright (C) 2012 Guido Günther
  *
  * This library is free software; you can redistribute it and/or
@@ -64,7 +65,7 @@ openvzVEGetStringParam(virDomainPtr domain, const char* param)
                                              "-o",
                                              param,
                                              domain->name,
-                                             "-H" , NULL);
+                                             "-H", NULL);

     virCommandSetOutputBuffer(cmd, &output);
     if (virCommandRun(cmd, NULL) < 0) {
diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
index 7181949..df7558b 100644
--- a/src/remote/remote_driver.c
+++ b/src/remote/remote_driver.c
@@ -4484,7 +4484,7 @@ remoteDomainBuildEventIOErrorReason(virNetClientProgramPtr prog ATTRIBUTE_UNUSED
     virDomainPtr dom;
     virDomainEventPtr event = NULL;

-    dom = get_nonnull_domain(conn,msg->dom);
+    dom = get_nonnull_domain(conn, msg->dom);
     if (!dom)
         return;

diff --git a/src/test/test_driver.c b/src/test/test_driver.c
index 2678247..469223e 100644
--- a/src/test/test_driver.c
+++ b/src/test/test_driver.c
@@ -1,7 +1,7 @@
 /*
  * test.c: A "mock" hypervisor for use by application unit tests
  *
- * Copyright (C) 2006-2012 Red Hat, Inc.
+ * Copyright (C) 2006-2013 Red Hat, Inc.
  * Copyright (C) 2006 Daniel P. Berrange
  *
  * This library is free software; you can redistribute it and/or
@@ -306,7 +306,7 @@ testBuildCapabilities(virConnectPtr conn) {

     if (virCapabilitiesAddHostFeature(caps, "pae") < 0)
         goto error;
-    if (virCapabilitiesAddHostFeature(caps ,"nonpae") < 0)
+    if (virCapabilitiesAddHostFeature(caps, "nonpae") < 0)
         goto error;

     for (i = 0; i < privconn->numCells; i++) {
@@ -344,7 +344,7 @@ testBuildCapabilities(virConnectPtr conn) {

         if (virCapabilitiesAddGuestFeature(guest, "pae", 1, 1) == NULL)
             goto error;
-        if (virCapabilitiesAddGuestFeature(guest ,"nonpae", 1, 1) == NULL)
+        if (virCapabilitiesAddGuestFeature(guest, "nonpae", 1, 1) == NULL)
             goto error;
     }

@@ -1620,7 +1620,7 @@ testDomainCreateXML(virConnectPtr conn, const char *xml,
     virCheckFlags(0, NULL);

     testDriverLock(privconn);
-    if ((def = virDomainDefParseString(xml,privconn->caps, privconn->xmlopt,
+    if ((def = virDomainDefParseString(xml, privconn->caps, privconn->xmlopt,
                                        1 << VIR_DOMAIN_VIRT_TEST,
                                        VIR_DOMAIN_XML_INACTIVE)) == NULL)
         goto cleanup;
@@ -2598,7 +2598,7 @@ static int testDomainGetVcpus(virDomainPtr domain,

     if (!virDomainObjIsActive(privdom)) {
         virReportError(VIR_ERR_OPERATION_INVALID,
-                       "%s",_("cannot list vcpus for an inactive domain"));
+                       "%s", _("cannot list vcpus for an inactive domain"));
         goto cleanup;
     }

@@ -2685,7 +2685,7 @@ static int testDomainPinVcpu(virDomainPtr domain,

     if (!virDomainObjIsActive(privdom)) {
         virReportError(VIR_ERR_OPERATION_INVALID,
-                       "%s",_("cannot pin vcpus on an inactive domain"));
+                       "%s", _("cannot pin vcpus on an inactive domain"));
         goto cleanup;
     }

-- 
1.8.3.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list





[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]