[libvirt] [PATCH v2 02/16] Use K&R style for curly braces in src/xen*/

Martin Kletzander mkletzan at redhat.com
Wed Mar 19 11:18:42 UTC 2014


Signed-off-by: Martin Kletzander <mkletzan at redhat.com>
---
 src/xen/xen_driver.c      |  6 ++++--
 src/xen/xen_hypervisor.c  |  5 +++--
 src/xen/xm_internal.c     | 10 +++++++---
 src/xenapi/xenapi_utils.c |  5 +++--
 src/xenxs/xen_xm.c        | 35 +++++++++++++++++++++++------------
 5 files changed, 40 insertions(+), 21 deletions(-)

diff --git a/src/xen/xen_driver.c b/src/xen/xen_driver.c
index 8ceb8b6..2199cb0 100644
--- a/src/xen/xen_driver.c
+++ b/src/xen/xen_driver.c
@@ -164,7 +164,8 @@ static virDomainDefPtr xenGetDomainDefForDom(virDomainPtr dom)
  * until reboot which might be false in future Xen implementations.
  */
 static void
-xenNumaInit(virConnectPtr conn) {
+xenNumaInit(virConnectPtr conn)
+{
     virNodeInfo nodeInfo;
     xenUnifiedPrivatePtr priv;
     int ret;
@@ -1916,7 +1917,8 @@ cleanup:
 }

 static int
-xenUnifiedDomainUndefine(virDomainPtr dom) {
+xenUnifiedDomainUndefine(virDomainPtr dom)
+{
     return xenUnifiedDomainUndefineFlags(dom, 0);
 }

diff --git a/src/xen/xen_hypervisor.c b/src/xen/xen_hypervisor.c
index 5ccd5fa..e8eaeeb 100644
--- a/src/xen/xen_hypervisor.c
+++ b/src/xen/xen_hypervisor.c
@@ -1,7 +1,7 @@
 /*
  * xen_hypervisor.c: direct access to Xen hypervisor level
  *
- * Copyright (C) 2005-2013 Red Hat, Inc.
+ * Copyright (C) 2005-2014 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
@@ -2006,7 +2006,8 @@ xenHypervisorInit(struct xenHypervisorVersions *override_versions)
 }


-static int xenHypervisorOnceInit(void) {
+static int xenHypervisorOnceInit(void)
+{
     return xenHypervisorInit(NULL);
 }

diff --git a/src/xen/xm_internal.c b/src/xen/xm_internal.c
index fbdd89e..846b79c 100644
--- a/src/xen/xm_internal.c
+++ b/src/xen/xm_internal.c
@@ -1,7 +1,7 @@
 /*
  * xm_internal.c: helper routines for dealing with inactive domains
  *
- * Copyright (C) 2006-2007, 2009-2013 Red Hat, Inc.
+ * Copyright (C) 2006-2007, 2009-2014 Red Hat, Inc.
  * Copyright (C) 2006 Daniel P. Berrange
  *
  * This library is free software; you can redistribute it and/or
@@ -94,7 +94,8 @@ static int xenInotifyActive(virConnectPtr conn)


 /* Release memory associated with a cached config object */
-static void xenXMConfigFree(void *payload, const void *key ATTRIBUTE_UNUSED) {
+static void xenXMConfigFree(void *payload, const void *key ATTRIBUTE_UNUSED)
+{
     xenXMConfCachePtr entry = (xenXMConfCachePtr)payload;
     virDomainDefFree(entry->def);
     VIR_FREE(entry->filename);
@@ -1117,7 +1118,10 @@ struct xenXMListIteratorContext {
 };

 static void
-xenXMListIterator(void *payload ATTRIBUTE_UNUSED, const void *name, void *data) {
+xenXMListIterator(void *payload ATTRIBUTE_UNUSED,
+                  const void *name,
+                  void *data)
+{
     struct xenXMListIteratorContext *ctx = data;
     virDomainDefPtr def = NULL;

diff --git a/src/xenapi/xenapi_utils.c b/src/xenapi/xenapi_utils.c
index 610e0f0..5a5025a 100644
--- a/src/xenapi/xenapi_utils.c
+++ b/src/xenapi/xenapi_utils.c
@@ -1,6 +1,6 @@
 /*
  * xenapi_utils.c: Xen API driver -- utils parts.
- * Copyright (C) 2011-2013 Red Hat, Inc.
+ * Copyright (C) 2011-2014 Red Hat, Inc.
  * Copyright (C) 2009, 2010 Citrix Ltd.
  *
  * This library is free software; you can redistribute it and/or
@@ -181,7 +181,8 @@ createXenAPIBootOrderString(int nboot, int *bootDevs)

 /* convert boot order string to libvirt boot order enum */
 enum virDomainBootOrder
-map2LibvirtBootOrder(char c) {
+map2LibvirtBootOrder(char c)
+{
     switch (c) {
     case 'a':
         return VIR_DOMAIN_BOOT_FLOPPY;
diff --git a/src/xenxs/xen_xm.c b/src/xenxs/xen_xm.c
index a70c5e3..fce074a 100644
--- a/src/xenxs/xen_xm.c
+++ b/src/xenxs/xen_xm.c
@@ -1,7 +1,7 @@
 /*
  * xen_xm.c: Xen XM parsing functions
  *
- * Copyright (C) 2006-2007, 2009-2010, 2012-2013 Red Hat, Inc.
+ * Copyright (C) 2006-2007, 2009-2010, 2012-2014 Red Hat, Inc.
  * Copyright (C) 2011 Univention GmbH
  * Copyright (C) 2006 Daniel P. Berrange
  *
@@ -44,7 +44,8 @@
 static int xenXMConfigGetBool(virConfPtr conf,
                               const char *name,
                               int *value,
-                              int def) {
+                              int def)
+{
     virConfValuePtr val;

     *value = 0;
@@ -70,7 +71,8 @@ static int xenXMConfigGetBool(virConfPtr conf,
 static int xenXMConfigGetULong(virConfPtr conf,
                                const char *name,
                                unsigned long *value,
-                               unsigned long def) {
+                               unsigned long def)
+{
     virConfValuePtr val;

     *value = 0;
@@ -102,7 +104,8 @@ static int xenXMConfigGetULong(virConfPtr conf,
 static int xenXMConfigGetULongLong(virConfPtr conf,
                                    const char *name,
                                    unsigned long long *value,
-                                   unsigned long long def) {
+                                   unsigned long long def)
+{
     virConfValuePtr val;

     *value = 0;
@@ -134,7 +137,8 @@ static int xenXMConfigGetULongLong(virConfPtr conf,
 static int xenXMConfigGetString(virConfPtr conf,
                                 const char *name,
                                 const char **value,
-                                const char *def) {
+                                const char *def)
+{
     virConfValuePtr val;

     *value = NULL;
@@ -158,7 +162,8 @@ static int xenXMConfigGetString(virConfPtr conf,
 static int xenXMConfigCopyStringInternal(virConfPtr conf,
                                          const char *name,
                                          char **value,
-                                         int allowMissing) {
+                                         int allowMissing)
+{
     virConfValuePtr val;

     *value = NULL;
@@ -201,7 +206,9 @@ static int xenXMConfigCopyStringOpt(virConfPtr conf,


 /* Convenience method to grab a string UUID from the config file object */
-static int xenXMConfigGetUUID(virConfPtr conf, const char *name, unsigned char *uuid) {
+static int
+xenXMConfigGetUUID(virConfPtr conf, const char *name, unsigned char *uuid)
+{
     virConfValuePtr val;

     if (!uuid || !name || !conf) {
@@ -248,7 +255,8 @@ static int xenXMConfigGetUUID(virConfPtr conf, const char *name, unsigned char *
  */
 virDomainDefPtr
 xenParseXM(virConfPtr conf, int xendConfigVersion,
-                       virCapsPtr caps) {
+                       virCapsPtr caps)
+{
     const char *str;
     int hvm = 0;
     int val;
@@ -1139,7 +1147,8 @@ cleanup:


 static
-int xenXMConfigSetInt(virConfPtr conf, const char *setting, long long l) {
+int xenXMConfigSetInt(virConfPtr conf, const char *setting, long long l)
+{
     virConfValuePtr value = NULL;

     if ((long) l != l) {
@@ -1158,8 +1167,9 @@ int xenXMConfigSetInt(virConfPtr conf, const char *setting, long long l) {
 }


-static
-int xenXMConfigSetString(virConfPtr conf, const char *setting, const char *str) {
+static int
+xenXMConfigSetString(virConfPtr conf, const char *setting, const char *str)
+{
     virConfValuePtr value = NULL;

     if (VIR_ALLOC(value) < 0)
@@ -1478,7 +1488,8 @@ verify(MAX_VIRT_CPUS <= sizeof(1UL) * CHAR_BIT);

 virConfPtr xenFormatXM(virConnectPtr conn,
                                    virDomainDefPtr def,
-                                   int xendConfigVersion) {
+                                   int xendConfigVersion)
+{
     virConfPtr conf = NULL;
     int hvm = 0, vmlocaltime = 0;
     size_t i;
-- 
1.9.0




More information about the libvir-list mailing list