]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
maint: fix comma style issues: xen
authorEric Blake <eblake@redhat.com>
Tue, 19 Nov 2013 22:32:34 +0000 (15:32 -0700)
committerEric Blake <eblake@redhat.com>
Wed, 20 Nov 2013 16:14:54 +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/libxl/libxl_driver.c: Consistently use commas.
* src/xen/xend_internal.c: Likewise.
* src/xen/xs_internal.c: Likewise.
* src/xenapi/xenapi_driver.c: Likewise.
* src/xenapi/xenapi_utils.c: Likewise.
* src/xenxs/xen_sxpr.c: Likewise.
* src/xenxs/xen_xm.c: Likewise.

Signed-off-by: Eric Blake <eblake@redhat.com>
src/libxl/libxl_driver.c
src/xen/xend_internal.c
src/xen/xs_internal.c
src/xenapi/xenapi_driver.c
src/xenapi/xenapi_utils.c
src/xenxs/xen_sxpr.c
src/xenxs/xen_xm.c

index 7a75a04cc460f9da9311a5ce0db9e0b7d7bf7ff2..1b42f14ebbda9af13ba9f1bbbeb9053ff382d8e6 100644 (file)
@@ -1501,7 +1501,7 @@ libxlDomainDestroyFlags(virDomainPtr dom,
         goto cleanup;
     }
 
-    event = virDomainEventNewFromObj(vm,VIR_DOMAIN_EVENT_STOPPED,
+    event = virDomainEventNewFromObj(vm, VIR_DOMAIN_EVENT_STOPPED,
                                      VIR_DOMAIN_EVENT_STOPPED_DESTROYED);
 
     if (libxlVmReap(driver, vm, VIR_DOMAIN_SHUTOFF_DESTROYED) != 0) {
index dc57350e2507440bc7ea1514a09347e74aa2a058..dac9a79f55d744536285ee9722812338771041ef 100644 (file)
@@ -549,7 +549,7 @@ xend_op(virConnectPtr xend, const char *name, const char *key, ...)
  * Returns a parsed S-Expression in case of success, NULL in case of failure
  */
 static struct sexpr *sexpr_get(virConnectPtr xend, const char *fmt, ...)
-  ATTRIBUTE_FMT_PRINTF(2,3);
+  ATTRIBUTE_FMT_PRINTF(2, 3);
 
 static struct sexpr *
 sexpr_get(virConnectPtr xend, const char *fmt, ...)
index 4368f85ada8dadd1aec5600e7c6c95f500217fa7..9748a77ccabe53a8f7a570ec0938f77485acf482 100644 (file)
@@ -815,7 +815,7 @@ retry:
     if (new_domain_cnt < 0)
         return -1;
 
-    if (VIR_ALLOC_N(new_domids,new_domain_cnt) < 0)
+    if (VIR_ALLOC_N(new_domids, new_domain_cnt) < 0)
         return -1;
     nread = xenStoreDoListDomains(conn, priv, new_domids, new_domain_cnt);
     if (nread != new_domain_cnt) {
@@ -898,7 +898,7 @@ retry:
     if (new_domain_cnt < 0)
         return -1;
 
-    if (VIR_ALLOC_N(new_domids,new_domain_cnt) < 0)
+    if (VIR_ALLOC_N(new_domids, new_domain_cnt) < 0)
         return -1;
     nread = xenStoreDoListDomains(conn, priv, new_domids, new_domain_cnt);
     if (nread != new_domain_cnt) {
index 5a798e7091b3b0773dea6a3b2391f7aca6dafe92..2c6fdce4d2b21af1089e9397e50870e77a003f5d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * xenapi_driver.c: Xen API driver.
- * Copyright (C) 2011-2012 Red Hat, Inc.
+ * Copyright (C) 2011-2013 Red Hat, Inc.
  * Copyright (C) 2009, 2010 Citrix Ltd.
  *
  * This library is free software; you can redistribute it and/or
@@ -637,7 +637,7 @@ xenapiDomainLookupByUUID(virConnectPtr conn,
     char uuidStr[VIR_UUID_STRING_BUFLEN];
     virDomainPtr domP = NULL;
     xen_session *session = ((struct _xenapiPrivate *)(conn->privateData))->session;
-    virUUIDFormat(uuid,uuidStr);
+    virUUIDFormat(uuid, uuidStr);
     if (xen_vm_get_by_uuid(session, &vm, uuidStr)) {
         xen_vm_get_record(session, &record, vm);
         if (record != NULL) {
@@ -1393,7 +1393,7 @@ xenapiDomainGetXMLDesc(virDomainPtr dom, unsigned int flags)
     if (VIR_STRDUP(defPtr->name, dom->name) < 0)
         goto error;
     xen_vm_get_hvm_boot_policy(session, &boot_policy, vm);
-    if (STREQ(boot_policy,"BIOS order")) {
+    if (STREQ(boot_policy, "BIOS order")) {
         if (VIR_STRDUP(defPtr->os.type, "hvm") < 0) {
             VIR_FREE(boot_policy);
             goto error;
@@ -2019,7 +2019,7 @@ write_func(void *ptr, size_t size, size_t nmemb, void *comms_)
     size_t n = size * nmemb;
 #ifdef PRINT_XML
     printf("\n\n---Result from server -----------------------\n");
-    printf("%s\n",((char*) ptr));
+    printf("%s\n", (char*) ptr);
     fflush(stdout);
 #endif
     return (size_t) (comms->func(ptr, n, comms->handle) ? n : 0);
@@ -2036,7 +2036,7 @@ call_func(const void *data, size_t len, void *user_handle,
     struct _xenapiPrivate *priv = (struct _xenapiPrivate *)user_handle;
 #ifdef PRINT_XML
     printf("\n\n---Data to server: -----------------------\n");
-    printf("%s\n",((char*) data));
+    printf("%s\n", (char*) data);
     fflush(stdout);
 #endif
     CURL *curl = curl_easy_init();
index 02d48854d15f149ab3c9a3576bac452c3d056692..427fc210ee513996586fb2bdf3d1bf104973bbc3 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * xenapi_utils.c: Xen API driver -- utils parts.
- * Copyright (C) 2011-2012 Red Hat, Inc.
+ * Copyright (C) 2011-2013 Red Hat, Inc.
  * Copyright (C) 2009, 2010 Citrix Ltd.
  *
  * This library is free software; you can redistribute it and/or
@@ -172,7 +172,7 @@ createXenAPIBootOrderString(int nboot, int *bootDevs)
         else if (bootDevs[i] == VIR_DOMAIN_BOOT_NET)
             val = (char *)"n";
         if (val)
-            virBufferEscapeString(&ret,"%s",val);
+            virBufferEscapeString(&ret, "%s", val);
     }
     return virBufferContentAndReset(&ret);
 }
@@ -231,20 +231,20 @@ xenapiCrashExitEnum2virDomainLifecycle(enum xen_on_crash_behaviour action)
 int
 getStorageVolumeType(char *type)
 {
-    if (STREQ(type,"lvmoiscsi") ||
-        STREQ(type,"lvmohba") ||
-        STREQ(type,"lvm") ||
-        STREQ(type,"file") ||
-        STREQ(type,"iso") ||
-        STREQ(type,"ext") ||
-        STREQ(type,"nfs"))
+    if (STREQ(type, "lvmoiscsi") ||
+        STREQ(type, "lvmohba") ||
+        STREQ(type, "lvm") ||
+        STREQ(type, "file") ||
+        STREQ(type, "iso") ||
+        STREQ(type, "ext") ||
+        STREQ(type, "nfs"))
         return (int)VIR_STORAGE_VOL_FILE;
-    else if (STREQ(type,"iscsi") ||
-             STREQ(type,"equal") ||
-             STREQ(type,"hba") ||
-             STREQ(type,"cslg") ||
-             STREQ(type,"udev") ||
-             STREQ(type,"netapp"))
+    else if (STREQ(type, "iscsi") ||
+             STREQ(type, "equal") ||
+             STREQ(type, "hba") ||
+             STREQ(type, "cslg") ||
+             STREQ(type, "udev") ||
+             STREQ(type, "netapp"))
         return (int)VIR_STORAGE_VOL_BLOCK;
     return -1;
 }
index d23a3ca7cdd5a689a295cd6355b87812ded0067c..d514725864565ff8dc03a8c747f76f8085617ce0 100644 (file)
@@ -2257,7 +2257,7 @@ xenFormatSxpr(virConnectPtr conn,
         if (hvm &&
             def->os.loader == NULL) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           "%s",_("no HVM domain loader"));
+                           "%s", _("no HVM domain loader"));
             goto error;
         }
 
index 88374f4a6ee6ae750e83e2ea5a19c84521408042..5e898760a3cb51184348a0268dffc3e2d16c3610 100644 (file)
@@ -1891,7 +1891,7 @@ virConfPtr xenFormatXM(virConnectPtr conn,
     netVal->list = NULL;
 
     for (i = 0; i < def->nnets; i++) {
-        if (xenFormatXMNet(conn, netVal,def->nets[i],
+        if (xenFormatXMNet(conn, netVal, def->nets[i],
                            hvm, xendConfigVersion) < 0)
             goto cleanup;
     }