Use K&R style for curly braces in src/xen*/

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
Martin Kletzander 2014-03-18 09:14:16 +01:00
parent f19b3a5f0c
commit 6e28dee258
5 changed files with 40 additions and 21 deletions

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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;

View File

@ -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;

View File

@ -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;