diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 508de21844..efc2eb0286 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -16068,8 +16068,7 @@ virDomainHostdevDefFormatSubsys(virBufferPtr buf, virBufferAddLit(buf, ">\n"); virBufferAdjustIndent(buf, 2); - switch (def->source.subsys.type) - { + switch (def->source.subsys.type) { case VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_USB: if (usbsrc->vendor) { virBufferAsprintf(buf, "\n", usbsrc->vendor); @@ -16146,8 +16145,7 @@ virDomainHostdevDefFormatCaps(virBufferPtr buf, virBufferAddLit(buf, "\n"); virBufferAdjustIndent(buf, 2); - switch (def->source.caps.type) - { + switch (def->source.caps.type) { case VIR_DOMAIN_HOSTDEV_CAPS_TYPE_STORAGE: virBufferEscapeString(buf, "%s\n", def->source.caps.u.storage.block); diff --git a/src/interface/interface_backend_netcf.c b/src/interface/interface_backend_netcf.c index 1b9ace5330..c55a080082 100644 --- a/src/interface/interface_backend_netcf.c +++ b/src/interface/interface_backend_netcf.c @@ -126,8 +126,7 @@ netcfStateReload(void) virObjectLock(driverState); ncf_close(driverState->netcf); - if (ncf_init(&driverState->netcf, NULL) != 0) - { + if (ncf_init(&driverState->netcf, NULL) != 0) { /* this isn't a good situation, because we can't shut down the * driver as there may still be connections to it. If we set * the netcf handle to NULL, any subsequent calls to netcf @@ -178,8 +177,7 @@ netcfGetMinimalDefForDevice(struct netcf_if *iface) static int netcf_to_vir_err(int netcf_errcode) { - switch (netcf_errcode) - { + switch (netcf_errcode) { case NETCF_NOERROR: /* no error, everything ok */ return VIR_ERR_OK; @@ -285,8 +283,7 @@ static int netcfInterfaceClose(virConnectPtr conn) { - if (conn->interfacePrivateData != NULL) - { + if (conn->interfacePrivateData != NULL) { virObjectUnref(conn->interfacePrivateData); conn->interfacePrivateData = NULL; } diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index 2886866a7d..0bc4a4dd01 100644 --- a/src/network/bridge_driver.c +++ b/src/network/bridge_driver.c @@ -3871,8 +3871,7 @@ networkAllocateActualDevice(virDomainDefPtr dom, iface->data.network.actual->data.hostdev.def.source.subsys.type = dev->type; iface->data.network.actual->data.hostdev.def.source.subsys.u.pci.addr = dev->device.pci; - switch (netdef->forward.driverName) - { + switch (netdef->forward.driverName) { case VIR_NETWORK_FORWARD_DRIVER_NAME_DEFAULT: backend = VIR_DOMAIN_HOSTDEV_PCI_BACKEND_DEFAULT; break; diff --git a/src/util/virfile.c b/src/util/virfile.c index b6f5e3f2cb..cfb6cc1024 100644 --- a/src/util/virfile.c +++ b/src/util/virfile.c @@ -1172,8 +1172,7 @@ virBuildPathInternal(char **path, ...) path_component = va_arg(ap, char *); virBufferAdd(&buf, path_component, -1); - while ((path_component = va_arg(ap, char *)) != NULL) - { + while ((path_component = va_arg(ap, char *)) != NULL) { virBufferAddChar(&buf, '/'); virBufferAdd(&buf, path_component, -1); } diff --git a/src/util/virnetdev.c b/src/util/virnetdev.c index 6a8c6aef83..8815e18819 100644 --- a/src/util/virnetdev.c +++ b/src/util/virnetdev.c @@ -1132,8 +1132,7 @@ virNetDevGetVirtualFunctions(const char *pfname, if (VIR_ALLOC_N(*vfname, *n_vfname) < 0) goto cleanup; - for (i = 0; i < *n_vfname; i++) - { + for (i = 0; i < *n_vfname; i++) { if (virPCIGetAddrString((*virt_fns)[i]->domain, (*virt_fns)[i]->bus, (*virt_fns)[i]->slot, diff --git a/src/util/virnetdevmacvlan.c b/src/util/virnetdevmacvlan.c index 50aabc58cc..c83341c0d7 100644 --- a/src/util/virnetdevmacvlan.c +++ b/src/util/virnetdevmacvlan.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2013 Red Hat, Inc. + * Copyright (C) 2010-2014 Red Hat, Inc. * Copyright (C) 2010-2012 IBM Corporation * * This library is free software; you can redistribute it and/or @@ -583,8 +583,7 @@ virNetDevMacVLanVPortProfileCallback(struct nlmsghdr *hdr, VIR_DEBUG("IFLA_VF_MAC = %2x:%2x:%2x:%2x:%2x:%2x", m[0], m[1], m[2], m[3], m[4], m[5]); - if (virMacAddrCmpRaw(&calld->macaddress, mac->mac)) - { + if (virMacAddrCmpRaw(&calld->macaddress, mac->mac)) { /* Repeat the same check for a broadcast mac */ size_t i; diff --git a/src/util/virtypedparam.c b/src/util/virtypedparam.c index 668a7df8ee..de2d447fd8 100644 --- a/src/util/virtypedparam.c +++ b/src/util/virtypedparam.c @@ -195,8 +195,7 @@ virTypedParameterAssign(virTypedParameterPtr param, const char *name, goto cleanup; } param->type = type; - switch (type) - { + switch (type) { case VIR_TYPED_PARAM_INT: param->value.i = va_arg(ap, int); break; diff --git a/src/util/virutil.c b/src/util/virutil.c index 2edbec5c5d..04113bbe55 100644 --- a/src/util/virutil.c +++ b/src/util/virutil.c @@ -1153,8 +1153,7 @@ virGetWin32DirectoryRoot(char **path) *path = NULL; - if (GetWindowsDirectory(windowsdir, ARRAY_CARDINALITY(windowsdir))) - { + if (GetWindowsDirectory(windowsdir, ARRAY_CARDINALITY(windowsdir))) { const char *tmp; /* Usually X:\Windows, but in terminal server environments * might be an UNC path, AFAIK. @@ -1499,8 +1498,7 @@ void virFileWaitForDevices(void) * If this fails for any reason, we still have the backup of polling for * 5 seconds for device nodes. */ - if (virRun(settleprog, &exitstatus) < 0) - {} + ignore_value(virRun(settleprog, &exitstatus)); } #else void virFileWaitForDevices(void) diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c index eecfff6c04..b9858ee0e8 100644 --- a/src/vbox/vbox_common.c +++ b/src/vbox/vbox_common.c @@ -3576,8 +3576,8 @@ vboxDumpNetwork(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine, PR MACAddress[8], MACAddress[9], MACAddress[10], MACAddress[11]); /* XXX some real error handling here some day ... */ - if (virMacAddrParse(macaddr, &def->nets[netAdpIncCnt]->mac) < 0) - {} + ignore_value(virMacAddrParse(macaddr, + &def->nets[netAdpIncCnt]->mac)); netAdpIncCnt++; diff --git a/tests/seclabeltest.c b/tests/seclabeltest.c index cd34b6b57c..51765c9ec4 100644 --- a/tests/seclabeltest.c +++ b/tests/seclabeltest.c @@ -24,16 +24,14 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) } model = virSecurityManagerGetModel(mgr); - if (!model) - { + if (!model) { fprintf(stderr, "Failed to copy secModel model: %s", strerror(errno)); return EXIT_FAILURE; } doi = virSecurityManagerGetDOI(mgr); - if (!doi) - { + if (!doi) { fprintf(stderr, "Failed to copy secModel DOI: %s", strerror(errno)); return EXIT_FAILURE;