From 95aed7febc8eca761ca6123a19d0801115ba568d Mon Sep 17 00:00:00 2001 From: Martin Kletzander Date: Tue, 18 Mar 2014 09:19:33 +0100 Subject: [PATCH] Use K&R style for curly braces in remaining files Signed-off-by: Martin Kletzander --- daemon/libvirtd-config.c | 9 +++++++-- docs/internals/command.html.in | 3 ++- examples/dominfo/info1.c | 7 ++++--- src/bhyve/bhyve_driver.c | 3 ++- src/interface/interface_backend_netcf.c | 8 +++++--- src/interface/interface_backend_udev.c | 4 +++- src/interface/interface_driver.c | 4 +++- src/libxl/libxl_domain.c | 3 ++- src/node_device/node_device_driver.c | 5 +++-- src/secret/secret_driver.c | 8 +++++--- src/security/security_stack.c | 8 +++++--- 11 files changed, 41 insertions(+), 21 deletions(-) diff --git a/daemon/libvirtd-config.c b/daemon/libvirtd-config.c index cff2a7ed1c..a14634005e 100644 --- a/daemon/libvirtd-config.c +++ b/daemon/libvirtd-config.c @@ -1,7 +1,7 @@ /* * libvirtd-config.c: daemon start of day, guest process & i/o management * - * Copyright (C) 2006-2012 Red Hat, Inc. + * Copyright (C) 2006-2012, 2014 Red Hat, Inc. * Copyright (C) 2006 Daniel P. Berrange * * This library is free software; you can redistribute it and/or @@ -158,7 +158,12 @@ checkType(virConfValuePtr p, const char *filename, } while (0) -static int remoteConfigGetAuth(virConfPtr conf, const char *key, int *auth, const char *filename) { +static int +remoteConfigGetAuth(virConfPtr conf, + const char *key, + int *auth, + const char *filename) +{ virConfValuePtr p; p = virConfGetValue(conf, key); diff --git a/docs/internals/command.html.in b/docs/internals/command.html.in index f5c28afd9a..fc767d96b1 100644 --- a/docs/internals/command.html.in +++ b/docs/internals/command.html.in @@ -560,7 +560,8 @@
 int runhook(const char *drvstr, const char *id,
             const char *opstr, const char *subopstr,
-            const char *extra) {
+            const char *extra)
+{
   int ret;
   char *path;
   virCommandPtr cmd;
diff --git a/examples/dominfo/info1.c b/examples/dominfo/info1.c
index 4d578bcae2..13c45ece30 100644
--- a/examples/dominfo/info1.c
+++ b/examples/dominfo/info1.c
@@ -19,7 +19,8 @@
  * extract the domain 0 information
  */
 static void
-getDomainInfo(int id) {
+getDomainInfo(int id)
+{
     virConnectPtr conn = NULL; /* the hypervisor connection */
     virDomainPtr dom = NULL;   /* the domain being checked */
     virDomainInfo info;        /* the information being fetched */
@@ -55,8 +56,8 @@ error:
         virConnectClose(conn);
 }
 
-int main() {
-
+int main()
+{
     getDomainInfo(0);
 
     return 0;
diff --git a/src/bhyve/bhyve_driver.c b/src/bhyve/bhyve_driver.c
index 370b1d3e9a..1cf3be2102 100644
--- a/src/bhyve/bhyve_driver.c
+++ b/src/bhyve/bhyve_driver.c
@@ -696,7 +696,8 @@ cleanup:
 
 static int
 bhyveConnectGetMaxVcpus(virConnectPtr conn ATTRIBUTE_UNUSED,
-                        const char *type) {
+                        const char *type)
+{
     if (virConnectGetMaxVcpusEnsureACL(conn) < 0)
         return -1;
 
diff --git a/src/interface/interface_backend_netcf.c b/src/interface/interface_backend_netcf.c
index 0948418792..666b5d476e 100644
--- a/src/interface/interface_backend_netcf.c
+++ b/src/interface/interface_backend_netcf.c
@@ -2,7 +2,7 @@
  * interface_backend_netcf.c: backend driver methods to handle physical
  *                            interface configuration using the netcf library.
  *
- * Copyright (C) 2006-2013 Red Hat, Inc.
+ * Copyright (C) 2006-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
@@ -900,7 +900,8 @@ cleanup:
     return ret;
 }
 
-static int netcfInterfaceUndefine(virInterfacePtr ifinfo) {
+static int netcfInterfaceUndefine(virInterfacePtr ifinfo)
+{
     virNetcfDriverStatePtr driver = ifinfo->conn->interfacePrivateData;
     struct netcf_if *iface = NULL;
     virInterfaceDefPtr def = NULL;
@@ -1190,7 +1191,8 @@ static virStateDriver interfaceStateDriver = {
     .stateReload = netcfStateReload,
 };
 
-int netcfIfaceRegister(void) {
+int netcfIfaceRegister(void)
+{
     if (virRegisterInterfaceDriver(&interfaceDriver) < 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
                        _("failed to register netcf interface driver"));
diff --git a/src/interface/interface_backend_udev.c b/src/interface/interface_backend_udev.c
index 75d5c48499..37f42bbe7e 100644
--- a/src/interface/interface_backend_udev.c
+++ b/src/interface/interface_backend_udev.c
@@ -1,6 +1,7 @@
 /*
  * interface_backend_udev.c: udev backend for virInterface
  *
+ * Copyright (C) 2014 Red Hat, Inc.
  * Copyright (C) 2012 Doug Goldstein 
  *
  * This library is free software; you can redistribute it and/or
@@ -1186,7 +1187,8 @@ static virInterfaceDriver udevIfaceDriver = {
 };
 
 int
-udevIfaceRegister(void) {
+udevIfaceRegister(void)
+{
     if (virRegisterInterfaceDriver(&udevIfaceDriver) < 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
                        _("failed to register udev interface driver"));
diff --git a/src/interface/interface_driver.c b/src/interface/interface_driver.c
index 5668a3f88c..b88fad1365 100644
--- a/src/interface/interface_driver.c
+++ b/src/interface/interface_driver.c
@@ -1,6 +1,7 @@
 /*
  * interface_driver.c: loads the appropriate backend
  *
+ * Copyright (C) 2014 Red Hat, Inc.
  * Copyright (C) 2012 Doug Goldstein 
  *
  * This library is free software; you can redistribute it and/or
@@ -22,7 +23,8 @@
 #include "interface_driver.h"
 
 int
-interfaceRegister(void) {
+interfaceRegister(void)
+{
 #ifdef WITH_NETCF
     /* Attempt to load the netcf based backend first */
     if (netcfIfaceRegister() == 0)
diff --git a/src/libxl/libxl_domain.c b/src/libxl/libxl_domain.c
index af15154182..6e9756e4c7 100644
--- a/src/libxl/libxl_domain.c
+++ b/src/libxl/libxl_domain.c
@@ -739,7 +739,8 @@ libxlDomainEventQueue(libxlDriverPrivatePtr driver, virObjectEventPtr event)
 }
 
 char *
-libxlDomainManagedSavePath(libxlDriverPrivatePtr driver, virDomainObjPtr vm) {
+libxlDomainManagedSavePath(libxlDriverPrivatePtr driver, virDomainObjPtr vm)
+{
     char *ret;
     libxlDriverConfigPtr cfg = libxlDriverConfigGet(driver);
 
diff --git a/src/node_device/node_device_driver.c b/src/node_device/node_device_driver.c
index 999f9ab7f3..638f074888 100644
--- a/src/node_device/node_device_driver.c
+++ b/src/node_device/node_device_driver.c
@@ -1,7 +1,7 @@
 /*
  * node_device_driver.c: node device enumeration
  *
- * Copyright (C) 2010-2013 Red Hat, Inc.
+ * Copyright (C) 2010-2014 Red Hat, Inc.
  * Copyright (C) 2008 Virtual Iron Software, Inc.
  * Copyright (C) 2008 David F. Lively
  *
@@ -626,7 +626,8 @@ out:
     return ret;
 }
 
-int nodedevRegister(void) {
+int nodedevRegister(void)
+{
 #if defined(WITH_HAL) && defined(WITH_UDEV)
     /* Register only one of these two - they conflict */
     if (udevNodeRegister() == -1)
diff --git a/src/secret/secret_driver.c b/src/secret/secret_driver.c
index a7c8010280..4123e6e1a7 100644
--- a/src/secret/secret_driver.c
+++ b/src/secret/secret_driver.c
@@ -1,7 +1,7 @@
 /*
  * secret_driver.c: local driver for secret manipulation API
  *
- * Copyright (C) 2009-2012 Red Hat, Inc.
+ * Copyright (C) 2009-2012, 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
@@ -537,7 +537,8 @@ secretOpen(virConnectPtr conn, virConnectAuthPtr auth ATTRIBUTE_UNUSED,
 }
 
 static int
-secretClose(virConnectPtr conn) {
+secretClose(virConnectPtr conn)
+{
     conn->secretPrivateData = NULL;
     return 0;
 }
@@ -631,7 +632,8 @@ secretUsageIDForDef(virSecretDefPtr def)
 static int
 secretConnectListAllSecrets(virConnectPtr conn,
                             virSecretPtr **secrets,
-                            unsigned int flags) {
+                            unsigned int flags)
+{
     virSecretDriverStatePtr driver = conn->secretPrivateData;
     virSecretPtr *tmp_secrets = NULL;
     int nsecrets = 0;
diff --git a/src/security/security_stack.c b/src/security/security_stack.c
index 0d42b21634..e4b2db6ba5 100644
--- a/src/security/security_stack.c
+++ b/src/security/security_stack.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010-2013 Red Hat, Inc.
+ * Copyright (C) 2010-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
@@ -528,8 +528,10 @@ virSecurityStackSetHugepages(virSecurityManagerPtr mgr,
     return rc;
 }
 
-static char *virSecurityStackGetMountOptions(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
-                                             virDomainDefPtr vm ATTRIBUTE_UNUSED) {
+static char *
+virSecurityStackGetMountOptions(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
+                                virDomainDefPtr vm ATTRIBUTE_UNUSED)
+{
     return NULL;
 }
 
-- 
GitLab