---
examples/object-events/event-test.c | 20 +++++------
src/conf/nwfilter_conf.c | 72 ++++++++++++++++++-------------------
src/esx/esx_vi.c | 2 +-
src/libvirt.c | 2 +-
src/nwfilter/nwfilter_learnipaddr.c | 2 +-
src/openvz/openvz_conf.c | 2 +-
src/openvz/openvz_driver.c | 2 +-
src/phyp/phyp_driver.c | 2 +-
src/util/virlog.c | 4 +--
src/util/virsysinfo.c | 2 +-
src/xen/xen_driver.c | 4 +--
src/xen/xs_internal.c | 10 +++---
src/xenapi/xenapi_driver.c | 22 ++++++------
tests/commandtest.c | 4 +--
tests/qemumonitorjsontest.c | 2 +-
tools/virsh-domain.c | 6 ++--
tools/virsh-host.c | 2 +-
tools/virt-login-shell.c | 2 +-
18 files changed, 81 insertions(+), 81 deletions(-)
diff --git a/examples/object-events/event-test.c b/examples/object-events/event-test.c
index 228a091..2a5a83b 100644
--- a/examples/object-events/event-test.c
+++ b/examples/object-events/event-test.c
@@ -70,22 +70,22 @@ const char *eventToString(int event) {
const char *ret = "";
switch ((virDomainEventType) event) {
case VIR_DOMAIN_EVENT_DEFINED:
- ret ="Defined";
+ ret = "Defined";
break;
case VIR_DOMAIN_EVENT_UNDEFINED:
- ret ="Undefined";
+ ret = "Undefined";
break;
case VIR_DOMAIN_EVENT_STARTED:
- ret ="Started";
+ ret = "Started";
break;
case VIR_DOMAIN_EVENT_SUSPENDED:
- ret ="Suspended";
+ ret = "Suspended";
break;
case VIR_DOMAIN_EVENT_RESUMED:
- ret ="Resumed";
+ ret = "Resumed";
break;
case VIR_DOMAIN_EVENT_STOPPED:
- ret ="Stopped";
+ ret = "Stopped";
break;
case VIR_DOMAIN_EVENT_SHUTDOWN:
ret = "Shutdown";
@@ -229,16 +229,16 @@ networkEventToString(int event)
const char *ret = "";
switch ((virNetworkEventLifecycleType) event) {
case VIR_NETWORK_EVENT_DEFINED:
- ret ="Defined";
+ ret = "Defined";
break;
case VIR_NETWORK_EVENT_UNDEFINED:
- ret ="Undefined";
+ ret = "Undefined";
break;
case VIR_NETWORK_EVENT_STARTED:
- ret ="Started";
+ ret = "Started";
break;
case VIR_NETWORK_EVENT_STOPPED:
- ret ="Stopped";
+ ret = "Stopped";
break;
}
return ret;
diff --git a/src/conf/nwfilter_conf.c b/src/conf/nwfilter_conf.c
index 30ec094..6db8ea9 100644
--- a/src/conf/nwfilter_conf.c
+++ b/src/conf/nwfilter_conf.c
@@ -161,30 +161,30 @@ virNWFilterUnlockFilterUpdates(void) {
/*
* attribute names for the rules XML
*/
-static const char srcmacaddr_str[] = "srcmacaddr";
-static const char srcmacmask_str[] = "srcmacmask";
-static const char dstmacaddr_str[] = "dstmacaddr";
-static const char dstmacmask_str[] = "dstmacmask";
-static const char arpsrcmacaddr_str[]= "arpsrcmacaddr";
-static const char arpdstmacaddr_str[]= "arpdstmacaddr";
-static const char arpsrcipaddr_str[] = "arpsrcipaddr";
-static const char arpdstipaddr_str[] = "arpdstipaddr";
-static const char srcipaddr_str[] = "srcipaddr";
-static const char srcipmask_str[] = "srcipmask";
-static const char dstipaddr_str[] = "dstipaddr";
-static const char dstipmask_str[] = "dstipmask";
-static const char srcipfrom_str[] = "srcipfrom";
-static const char srcipto_str[] = "srcipto";
-static const char dstipfrom_str[] = "dstipfrom";
-static const char dstipto_str[] = "dstipto";
-static const char srcportstart_str[] = "srcportstart";
-static const char srcportend_str[] = "srcportend";
-static const char dstportstart_str[] = "dstportstart";
-static const char dstportend_str[] = "dstportend";
-static const char dscp_str[] = "dscp";
-static const char state_str[] = "state";
-static const char ipset_str[] = "ipset";
-static const char ipsetflags_str[] = "ipsetflags";
+static const char srcmacaddr_str[] = "srcmacaddr";
+static const char srcmacmask_str[] = "srcmacmask";
+static const char dstmacaddr_str[] = "dstmacaddr";
+static const char dstmacmask_str[] = "dstmacmask";
+static const char arpsrcmacaddr_str[] = "arpsrcmacaddr";
+static const char arpdstmacaddr_str[] = "arpdstmacaddr";
+static const char arpsrcipaddr_str[] = "arpsrcipaddr";
+static const char arpdstipaddr_str[] = "arpdstipaddr";
+static const char srcipaddr_str[] = "srcipaddr";
+static const char srcipmask_str[] = "srcipmask";
+static const char dstipaddr_str[] = "dstipaddr";
+static const char dstipmask_str[] = "dstipmask";
+static const char srcipfrom_str[] = "srcipfrom";
+static const char srcipto_str[] = "srcipto";
+static const char dstipfrom_str[] = "dstipfrom";
+static const char dstipto_str[] = "dstipto";
+static const char srcportstart_str[] = "srcportstart";
+static const char srcportend_str[] = "srcportend";
+static const char dstportstart_str[] = "dstportstart";
+static const char dstportend_str[] = "dstportend";
+static const char dscp_str[] = "dscp";
+static const char state_str[] = "state";
+static const char ipset_str[] = "ipset";
+static const char ipsetflags_str[] = "ipsetflags";
#define SRCMACADDR srcmacaddr_str
#define SRCMACMASK srcmacmask_str
@@ -1116,8 +1116,8 @@ static const virXMLAttr2Struct macAttributes[] = {
.name = "protocolid",
.datatype = DATATYPE_UINT16 | DATATYPE_UINT16_HEX | DATATYPE_STRING,
.dataIdx = offsetof(virNWFilterRuleDef, p.ethHdrFilter.dataProtocolID),
- .validator= checkMacProtocolID,
- .formatter= macProtocolIDFormatter,
+ .validator = checkMacProtocolID,
+ .formatter = macProtocolIDFormatter,
},
COMMENT_PROP(ethHdrFilter),
{
@@ -1292,8 +1292,8 @@ static const virXMLAttr2Struct arpAttributes[] = {
.name = "opcode",
.datatype = DATATYPE_UINT16 | DATATYPE_UINT16_HEX | DATATYPE_STRING,
.dataIdx = offsetof(virNWFilterRuleDef, p.arpHdrFilter.dataOpcode),
- .validator= arpOpcodeValidator,
- .formatter= arpOpcodeFormatter,
+ .validator = arpOpcodeValidator,
+ .formatter = arpOpcodeFormatter,
}, {
.name = ARPSRCMACADDR,
.datatype = DATATYPE_MACADDR,
@@ -1347,8 +1347,8 @@ static const virXMLAttr2Struct ipAttributes[] = {
.name = "protocol",
.datatype = DATATYPE_STRING | DATATYPE_UINT8 | DATATYPE_UINT8_HEX,
.dataIdx = offsetof(virNWFilterRuleDef, p.ipHdrFilter.ipHdr.dataProtocolID),
- .validator= checkIPProtocolID,
- .formatter= formatIPProtocolID,
+ .validator = checkIPProtocolID,
+ .formatter = formatIPProtocolID,
},
{
.name = SRCPORTSTART,
@@ -1409,8 +1409,8 @@ static const virXMLAttr2Struct ipv6Attributes[] = {
.name = "protocol",
.datatype = DATATYPE_STRING | DATATYPE_UINT8 | DATATYPE_UINT8_HEX,
.dataIdx = offsetof(virNWFilterRuleDef, p.ipv6HdrFilter.ipHdr.dataProtocolID),
- .validator= checkIPProtocolID,
- .formatter= formatIPProtocolID,
+ .validator = checkIPProtocolID,
+ .formatter = formatIPProtocolID,
},
{
.name = SRCPORTSTART,
@@ -2306,10 +2306,10 @@ virNWFilterRuleParse(xmlNodePtr node)
if (VIR_ALLOC(ret) < 0)
return NULL;
- action = virXMLPropString(node, "action");
- direction = virXMLPropString(node, "direction");
- prio = virXMLPropString(node, "priority");
- statematch= virXMLPropString(node, "statematch");
+ action = virXMLPropString(node, "action");
+ direction = virXMLPropString(node, "direction");
+ prio = virXMLPropString(node, "priority");
+ statematch = virXMLPropString(node, "statematch");
if (!action) {
virReportError(VIR_ERR_INTERNAL_ERROR,
diff --git a/src/esx/esx_vi.c b/src/esx/esx_vi.c
index 052b969..777ce30 100644
--- a/src/esx/esx_vi.c
+++ b/src/esx/esx_vi.c
@@ -4695,7 +4695,7 @@ esxVI_LookupHostInternetScsiHba(esxVI_Context *ctx,
for (hostHostBusAdapter = hostHostBusAdapterList;
hostHostBusAdapter;
hostHostBusAdapter = hostHostBusAdapter->_next) {
- esxVI_HostInternetScsiHba *candidate=
+ esxVI_HostInternetScsiHba *candidate =
esxVI_HostInternetScsiHba_DynamicCast(hostHostBusAdapter);
if (candidate) {
diff --git a/src/libvirt.c b/src/libvirt.c
index ead0813..66d972e 100644
--- a/src/libvirt.c
+++ b/src/libvirt.c
@@ -8305,7 +8305,7 @@ virDomainBlockResize(virDomainPtr dom,
if (conn->driver->domainBlockResize) {
int ret;
- ret =conn->driver->domainBlockResize(dom, disk, size, flags);
+ ret = conn->driver->domainBlockResize(dom, disk, size, flags);
if (ret < 0)
goto error;
return ret;
diff --git a/src/nwfilter/nwfilter_learnipaddr.c b/src/nwfilter/nwfilter_learnipaddr.c
index 00f9992..e071ff4 100644
--- a/src/nwfilter/nwfilter_learnipaddr.c
+++ b/src/nwfilter/nwfilter_learnipaddr.c
@@ -557,7 +557,7 @@ learnIPAddressThread(void *arg)
iphdr->ihl * 4 +
sizeof(struct udphdr))) {
VIR_WARNINGS_NO_CAST_ALIGN
- struct udphdr *udphdr= (struct udphdr *)
+ struct udphdr *udphdr = (struct udphdr *)
((char *)iphdr + iphdr->ihl * 4);
VIR_WARNINGS_RESET
if (ntohs(udphdr->source) == 67 &&
diff --git a/src/openvz/openvz_conf.c b/src/openvz/openvz_conf.c
index 91b16f8..b14e1d7 100644
--- a/src/openvz/openvz_conf.c
+++ b/src/openvz/openvz_conf.c
@@ -937,7 +937,7 @@ static char *
openvzLocateConfDir(void)
{
const char *conf_dir_list[] = {"/etc/vz/conf",
"/usr/local/etc/conf", NULL};
- int i=0;
+ int i = 0;
char *ret = NULL;
while (conf_dir_list[i]) {
diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c
index aee7390..b27ac4c 100644
--- a/src/openvz/openvz_driver.c
+++ b/src/openvz/openvz_driver.c
@@ -786,7 +786,7 @@ openvzGenerateContainerVethName(int veid)
int max = 0;
/* get maximum interface number (actually, it is the last one) */
- for (s=strtok_r(temp, ";", &saveptr); s; s=strtok_r(NULL,
";", &saveptr)) {
+ for (s = strtok_r(temp, ";", &saveptr); s; s = strtok_r(NULL,
";", &saveptr)) {
int x;
if (sscanf(s, "ifname=eth%d", &x) != 1) return NULL;
diff --git a/src/phyp/phyp_driver.c b/src/phyp/phyp_driver.c
index 3ff3006..20b5bd4 100644
--- a/src/phyp/phyp_driver.c
+++ b/src/phyp/phyp_driver.c
@@ -68,7 +68,7 @@
static unsigned const int HMC = 0;
static unsigned const int IVM = 127;
static unsigned const int PHYP_IFACENAME_SIZE = 24;
-static unsigned const int PHYP_MAC_SIZE= 12;
+static unsigned const int PHYP_MAC_SIZE = 12;
static int
waitsocket(int socket_fd, LIBSSH2_SESSION * session)
diff --git a/src/util/virlog.c b/src/util/virlog.c
index dfb4d69..32714ce 100644
--- a/src/util/virlog.c
+++ b/src/util/virlog.c
@@ -1347,7 +1347,7 @@ virLogParseOutputs(const char *outputs)
virSkipSpaces(&cur);
while (*cur != 0) {
- prio= virParseNumber(&cur);
+ prio = virParseNumber(&cur);
if ((prio < VIR_LOG_DEBUG) || (prio > VIR_LOG_ERROR))
goto cleanup;
if (*cur != ':')
@@ -1452,7 +1452,7 @@ virLogParseFilters(const char *filters)
virSkipSpaces(&cur);
while (*cur != 0) {
unsigned int flags = 0;
- prio= virParseNumber(&cur);
+ prio = virParseNumber(&cur);
if ((prio < VIR_LOG_DEBUG) || (prio > VIR_LOG_ERROR))
goto cleanup;
if (*cur != ':')
diff --git a/src/util/virsysinfo.c b/src/util/virsysinfo.c
index 18f426d..b264c00 100644
--- a/src/util/virsysinfo.c
+++ b/src/util/virsysinfo.c
@@ -425,7 +425,7 @@ virSysinfoParseProcessor(const char *base, virSysinfoDefPtr ret)
int result = -1;
virSysinfoProcessorDefPtr processor;
- if (!(tmp_base=virSysinfoParseLine(base, "vendor_id", &manufacturer)))
+ if (!(tmp_base = virSysinfoParseLine(base, "vendor_id",
&manufacturer)))
goto cleanup;
/* Find processor N: line and gather the processor manufacturer,
diff --git a/src/xen/xen_driver.c b/src/xen/xen_driver.c
index 7a57624..65c3a5c 100644
--- a/src/xen/xen_driver.c
+++ b/src/xen/xen_driver.c
@@ -2841,7 +2841,7 @@ xenUnifiedDomainInfoListFree(xenUnifiedDomainInfoListPtr list)
if (list == NULL)
return;
- for (i=0; i<list->count; i++) {
+ for (i = 0; i < list->count; i++) {
VIR_FREE(list->doms[i]->name);
VIR_FREE(list->doms[i]);
}
@@ -2865,7 +2865,7 @@ xenUnifiedAddDomainInfo(xenUnifiedDomainInfoListPtr list,
int n;
/* check if we already have this callback on our list */
- for (n=0; n < list->count; n++) {
+ for (n = 0; n < list->count; n++) {
if (STREQ(list->doms[n]->name, name) &&
!memcmp(list->doms[n]->uuid, uuid, VIR_UUID_BUFLEN)) {
VIR_DEBUG("WARNING: dom already tracked");
diff --git a/src/xen/xs_internal.c b/src/xen/xs_internal.c
index 9be7591..ccdb736 100644
--- a/src/xen/xs_internal.c
+++ b/src/xen/xs_internal.c
@@ -616,7 +616,7 @@ static void
xenStoreWatchListFree(xenStoreWatchListPtr list)
{
size_t i;
- for (i=0; i<list->count; i++) {
+ for (i = 0; i < list->count; i++) {
VIR_FREE(list->watches[i]->path);
VIR_FREE(list->watches[i]->token);
VIR_FREE(list->watches[i]);
@@ -648,7 +648,7 @@ xenStoreAddWatch(virConnectPtr conn,
return -1;
/* check if we already have this callback on our list */
- for (n=0; n < list->count; n++) {
+ for (n = 0; n < list->count; n++) {
if (STREQ(list->watches[n]->path, path) &&
STREQ(list->watches[n]->token, token)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
@@ -825,7 +825,7 @@ retry:
}
missing = 0;
- for (i=0; i < new_domain_cnt; i++) {
+ for (i = 0; i < new_domain_cnt; i++) {
found = 0;
for (j = 0; j < priv->activeDomainList->count; j++) {
if (priv->activeDomainList->doms[j]->id == new_domids[i]) {
@@ -908,9 +908,9 @@ retry:
}
removed = 0;
- for (j=0; j < priv->activeDomainList->count; j++) {
+ for (j = 0; j < priv->activeDomainList->count; j++) {
found = 0;
- for (i=0; i < new_domain_cnt; i++) {
+ for (i = 0; i < new_domain_cnt; i++) {
if (priv->activeDomainList->doms[j]->id == new_domids[i]) {
found = 1;
break;
diff --git a/src/xenapi/xenapi_driver.c b/src/xenapi/xenapi_driver.c
index 2c6fdce..a547306 100644
--- a/src/xenapi/xenapi_driver.c
+++ b/src/xenapi/xenapi_driver.c
@@ -582,7 +582,7 @@ xenapiDomainLookupByID(virConnectPtr conn, int id)
xen_vm_set *result;
xen_vm_record *record;
unsigned char raw_uuid[VIR_UUID_BUFLEN];
- virDomainPtr domP=NULL;
+ virDomainPtr domP = NULL;
xen_session *session = ((struct _xenapiPrivate
*)(conn->privateData))->session;
xen_session_get_this_host(session, &host, session);
@@ -722,7 +722,7 @@ xenapiDomainSuspend(virDomainPtr dom)
{
/* vm.pause() */
xen_vm vm;
- xen_vm_set *vms=NULL;
+ xen_vm_set *vms = NULL;
xen_session *session = ((struct _xenapiPrivate
*)(dom->conn->privateData))->session;
if (xen_vm_get_by_name_label(session, &vms, dom->name) &&
vms->size > 0) {
if (vms->size != 1) {
@@ -931,10 +931,10 @@ xenapiDomainDestroy(virDomainPtr dom)
static char *
xenapiDomainGetOSType(virDomainPtr dom)
{
- xen_vm vm=NULL;
+ xen_vm vm = NULL;
xen_vm_set *vms;
char *ostype = NULL;
- char *boot_policy=NULL;
+ char *boot_policy = NULL;
xen_session *session = ((struct _xenapiPrivate
*)(dom->conn->privateData))->session;
if (xen_vm_get_by_name_label(session, &vms, dom->name) && vms->size
> 0) {
@@ -1360,14 +1360,14 @@ xenapiDomainGetMaxVcpus(virDomainPtr dom)
static char *
xenapiDomainGetXMLDesc(virDomainPtr dom, unsigned int flags)
{
- xen_vm vm=NULL;
+ xen_vm vm = NULL;
xen_vm_set *vms;
- xen_string_string_map *result=NULL;
+ xen_string_string_map *result = NULL;
xen_session *session = ((struct _xenapiPrivate
*)(dom->conn->privateData))->session;
virDomainDefPtr defPtr = NULL;
char *boot_policy = NULL;
- unsigned long memory=0;
- int64_t dynamic_mem=0;
+ unsigned long memory = 0;
+ int64_t dynamic_mem = 0;
char *val = NULL;
struct xen_vif_set *vif_set = NULL;
char *xml;
@@ -1700,9 +1700,9 @@ static virDomainPtr
xenapiDomainDefineXML(virConnectPtr conn, const char *xml)
{
struct _xenapiPrivate *priv = conn->privateData;
- xen_vm_record *record=NULL;
- xen_vm vm=NULL;
- virDomainPtr domP=NULL;
+ xen_vm_record *record = NULL;
+ xen_vm vm = NULL;
+ virDomainPtr domP = NULL;
if (!priv->caps)
return NULL;
virDomainDefPtr defPtr = virDomainDefParseString(xml,
diff --git a/tests/commandtest.c b/tests/commandtest.c
index 7ff4d5f..2ae8871 100644
--- a/tests/commandtest.c
+++ b/tests/commandtest.c
@@ -857,10 +857,10 @@ static int test21(const void *unused ATTRIBUTE_UNUSED)
int ret = -1;
const char *wrbuf = "Hello world\n";
char *outbuf = NULL, *errbuf = NULL;
- const char *outbufExpected="BEGIN STDOUT\n"
+ const char *outbufExpected = "BEGIN STDOUT\n"
"Hello world\n"
"END STDOUT\n";
- const char *errbufExpected="BEGIN STDERR\n"
+ const char *errbufExpected = "BEGIN STDERR\n"
"Hello world\n"
"END STDERR\n";
diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c
index 2152e4a..d7da5a8 100644
--- a/tests/qemumonitorjsontest.c
+++ b/tests/qemumonitorjsontest.c
@@ -705,7 +705,7 @@ testQemuMonitorJSONAttachChardev(const void *data)
chr = (virDomainChrSourceDef) { .type = VIR_DOMAIN_CHR_TYPE_NULL };
CHECK("chr_null", "{\"return\": {}}");
- chr = (virDomainChrSourceDef) { .type =VIR_DOMAIN_CHR_TYPE_VC };
+ chr = (virDomainChrSourceDef) { .type = VIR_DOMAIN_CHR_TYPE_VC };
CHECK("chr_vc", "{\"return\": {}}");
#define PTY_PATH "/dev/ttyS0"
diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index 506baf4..d577aa2 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -9782,11 +9782,11 @@ cmdDetachInterface(vshControl *ctl, const vshCmd *cmd)
{
virDomainPtr dom = NULL;
xmlDocPtr xml = NULL;
- xmlXPathObjectPtr obj=NULL;
+ xmlXPathObjectPtr obj = NULL;
xmlXPathContextPtr ctxt = NULL;
xmlNodePtr cur = NULL, matchNode = NULL;
char *detach_xml = NULL;
- const char *mac =NULL, *type = NULL;
+ const char *mac = NULL, *type = NULL;
char *doc = NULL;
char buf[64];
int diff_mac;
@@ -9922,7 +9922,7 @@ vshFindDisk(const char *doc,
int type)
{
xmlDocPtr xml = NULL;
- xmlXPathObjectPtr obj= NULL;
+ xmlXPathObjectPtr obj = NULL;
xmlXPathContextPtr ctxt = NULL;
xmlNodePtr cur = NULL;
xmlNodePtr ret = NULL;
diff --git a/tools/virsh-host.c b/tools/virsh-host.c
index 1d1bb97..967bd52 100644
--- a/tools/virsh-host.c
+++ b/tools/virsh-host.c
@@ -149,7 +149,7 @@ cmdFreecell(vshControl *ctl, const vshCmd *cmd)
goto cleanup;
}
VIR_FREE(val);
- nodes_id[i]=id;
+ nodes_id[i] = id;
if (virNodeGetCellsFreeMemory(ctl->conn, &(nodes_free[i]),
id, 1) != 1) {
vshError(ctl, _("failed to get free memory for NUMA node "
diff --git a/tools/virt-login-shell.c b/tools/virt-login-shell.c
index c0a4eeb..5b85d15 100644
--- a/tools/virt-login-shell.c
+++ b/tools/virt-login-shell.c
@@ -117,7 +117,7 @@ cleanup:
static char **virLoginShellGetShellArgv(virConfPtr conf)
{
size_t i;
- char **shargv=NULL;
+ char **shargv = NULL;
virConfValuePtr p;
p = virConfGetValue(conf, "shell");
--
1.8.4