Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
src/vbox/vbox_MSCOMGlue.c | 18 +++---
src/vbox/vbox_common.c | 108 +++++++++++++++++-----------------
src/vbox/vbox_common.h | 4 +-
src/vbox/vbox_snapshot_conf.c | 12 ++--
src/vbox/vbox_storage.c | 10 ++--
src/vbox/vbox_tmpl.c | 26 ++++----
6 files changed, 89 insertions(+), 89 deletions(-)
diff --git a/src/vbox/vbox_MSCOMGlue.c b/src/vbox/vbox_MSCOMGlue.c
index 7208d73b534d..10a260495989 100644
--- a/src/vbox/vbox_MSCOMGlue.c
+++ b/src/vbox/vbox_MSCOMGlue.c
@@ -538,7 +538,7 @@ vboxComInitialize_v2(const char *pszVirtualBoxIID, IVirtualBox
**ppVirtualBox,
if (FAILED(hrc)) {
VIR_ERROR(_("Could not parse IID from '%s', rc = 0x%08x"),
- pszVirtualBoxIID, (unsigned int)hrc);
+ pszVirtualBoxIID, (unsigned int) hrc);
goto cleanup;
}
@@ -546,7 +546,7 @@ vboxComInitialize_v2(const char *pszVirtualBoxIID, IVirtualBox
**ppVirtualBox,
if (FAILED(hrc)) {
VIR_ERROR(_("Could not parse IID from '%s', rc = 0x%08x"),
- pszVirtualBoxIID, (unsigned int)hrc);
+ pszVirtualBoxIID, (unsigned int) hrc);
goto cleanup;
}
@@ -555,7 +555,7 @@ vboxComInitialize_v2(const char *pszVirtualBoxIID, IVirtualBox
**ppVirtualBox,
if (FAILED(hrc)) {
VIR_ERROR(_("Could not create VirtualBox instance, rc = 0x%08x"),
- (unsigned int)hrc);
+ (unsigned int) hrc);
goto cleanup;
}
@@ -564,7 +564,7 @@ vboxComInitialize_v2(const char *pszVirtualBoxIID, IVirtualBox
**ppVirtualBox,
if (FAILED(hrc)) {
VIR_ERROR(_("Could not create Session instance, rc = 0x%08x"),
- (unsigned int)hrc);
+ (unsigned int) hrc);
goto cleanup;
}
@@ -576,12 +576,12 @@ vboxComInitialize_v2(const char *pszVirtualBoxIID, IVirtualBox
**ppVirtualBox,
cleanup:
if (result < 0) {
if (vboxVirtualBox != NULL) {
- vboxVirtualBox->vtbl->nsisupports.Release((nsISupports
*)vboxVirtualBox);
+ vboxVirtualBox->vtbl->nsisupports.Release((nsISupports *)
vboxVirtualBox);
vboxVirtualBox = NULL;
}
if (vboxSession != NULL) {
- vboxSession->vtbl->nsisupports.Release((nsISupports *)vboxSession);
+ vboxSession->vtbl->nsisupports.Release((nsISupports *) vboxSession);
vboxSession = NULL;
}
}
@@ -601,12 +601,12 @@ static void
vboxComUninitialize(void)
{
if (vboxVirtualBox != NULL) {
- vboxVirtualBox->vtbl->nsisupports.Release((nsISupports *)vboxVirtualBox);
+ vboxVirtualBox->vtbl->nsisupports.Release((nsISupports *) vboxVirtualBox);
vboxVirtualBox = NULL;
}
if (vboxSession != NULL) {
- vboxSession->vtbl->nsisupports.Release((nsISupports *)vboxSession);
+ vboxSession->vtbl->nsisupports.Release((nsISupports *) vboxSession);
vboxSession = NULL;
}
@@ -703,7 +703,7 @@ vboxArrayGetHelper(vboxArray *array, HRESULT hrc, SAFEARRAY
*safeArray)
if (FAILED(hrc))
return hrc;
- hrc = SafeArrayAccessData(safeArray, (void **)&items);
+ hrc = SafeArrayAccessData(safeArray, (void **) &items);
if (FAILED(hrc)) {
SafeArrayDestroy(safeArray);
diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c
index 72a24a34642d..0f6623bd9604 100644
--- a/src/vbox/vbox_common.c
+++ b/src/vbox/vbox_common.c
@@ -697,7 +697,7 @@ static int vboxConnectListDomains(virConnectPtr conn, int *ids, int
nids)
if (NS_FAILED(rc)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Could not get list of Domains, rc=%08x"),
- (unsigned)rc);
+ (unsigned) rc);
goto cleanup;
}
@@ -738,7 +738,7 @@ static int vboxConnectNumOfDomains(virConnectPtr conn)
rc = gVBoxAPI.UArray.vboxArrayGet(&machines, data->vboxObj,
ARRAY_GET_MACHINES);
if (NS_FAILED(rc)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not get number of Domains, rc=%08x"),
(unsigned)rc);
+ _("Could not get number of Domains, rc=%08x"),
(unsigned) rc);
goto cleanup;
}
@@ -792,7 +792,7 @@ static virDomainPtr vboxDomainLookupByID(virConnectPtr conn, int id)
rc = gVBoxAPI.UArray.vboxArrayGet(&machines, data->vboxObj,
ARRAY_GET_MACHINES);
if (NS_FAILED(rc)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not get list of machines, rc=%08x"),
(unsigned)rc);
+ _("Could not get list of machines, rc=%08x"), (unsigned)
rc);
return NULL;
}
@@ -858,7 +858,7 @@ virDomainPtr vboxDomainLookupByUUID(virConnectPtr conn,
rc = gVBoxAPI.UArray.vboxArrayGet(&machines, data->vboxObj,
ARRAY_GET_MACHINES);
if (NS_FAILED(rc)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not get list of machines, rc=%08x"),
(unsigned)rc);
+ _("Could not get list of machines, rc=%08x"), (unsigned)
rc);
return NULL;
}
@@ -930,7 +930,7 @@ vboxDomainLookupByName(virConnectPtr conn, const char *name)
rc = gVBoxAPI.UArray.vboxArrayGet(&machines, data->vboxObj,
ARRAY_GET_MACHINES);
if (NS_FAILED(rc)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not get list of machines, rc=%08x"),
(unsigned)rc);
+ _("Could not get list of machines, rc=%08x"), (unsigned)
rc);
return NULL;
}
@@ -1888,7 +1888,7 @@ vboxDomainDefineXMLFlags(virConnectPtr conn, const char *xml,
unsigned int flags
if (NS_FAILED(rc)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("could not define a domain, rc=%08x"), (unsigned)rc);
+ _("could not define a domain, rc=%08x"), (unsigned)
rc);
goto cleanup;
}
@@ -1898,7 +1898,7 @@ vboxDomainDefineXMLFlags(virConnectPtr conn, const char *xml,
unsigned int flags
virReportError(VIR_ERR_INTERNAL_ERROR,
_("could not set the memory size of the domain to: %llu Kb,
"
"rc=%08x"),
- def->mem.cur_balloon, (unsigned)rc);
+ def->mem.cur_balloon, (unsigned) rc);
}
if (virDomainDefHasVcpusOffline(def)) {
@@ -1909,7 +1909,7 @@ vboxDomainDefineXMLFlags(virConnectPtr conn, const char *xml,
unsigned int flags
if (NS_FAILED(rc)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("could not set the number of virtual CPUs to: %u,
rc=%08x"),
- virDomainDefGetVcpusMax(def), (unsigned)rc);
+ virDomainDefGetVcpusMax(def), (unsigned) rc);
}
rc = gVBoxAPI.UIMachine.SetCPUProperty(machine, CPUPropertyType_PAE,
@@ -1919,7 +1919,7 @@ vboxDomainDefineXMLFlags(virConnectPtr conn, const char *xml,
unsigned int flags
virReportError(VIR_ERR_INTERNAL_ERROR,
_("could not change PAE status to: %s, rc=%08x"),
(def->features[VIR_DOMAIN_FEATURE_PAE] ==
VIR_TRISTATE_SWITCH_ON)
- ? _("Enabled") : _("Disabled"),
(unsigned)rc);
+ ? _("Enabled") : _("Disabled"), (unsigned)
rc);
}
gVBoxAPI.UIMachine.GetBIOSSettings(machine, &bios);
@@ -1931,7 +1931,7 @@ vboxDomainDefineXMLFlags(virConnectPtr conn, const char *xml,
unsigned int flags
virReportError(VIR_ERR_INTERNAL_ERROR,
_("could not change ACPI status to: %s, rc=%08x"),
(def->features[VIR_DOMAIN_FEATURE_ACPI] ==
VIR_TRISTATE_SWITCH_ON)
- ? _("Enabled") : _("Disabled"),
(unsigned)rc);
+ ? _("Enabled") : _("Disabled"), (unsigned)
rc);
}
rc = gVBoxAPI.UIBIOSSettings.SetIOAPICEnabled(bios,
def->features[VIR_DOMAIN_FEATURE_APIC] ==
@@ -1940,7 +1940,7 @@ vboxDomainDefineXMLFlags(virConnectPtr conn, const char *xml,
unsigned int flags
virReportError(VIR_ERR_INTERNAL_ERROR,
_("could not change APIC status to: %s, rc=%08x"),
(def->features[VIR_DOMAIN_FEATURE_APIC] ==
VIR_TRISTATE_SWITCH_ON)
- ? _("Enabled") : _("Disabled"),
(unsigned)rc);
+ ? _("Enabled") : _("Disabled"), (unsigned)
rc);
}
VBOX_RELEASE(bios);
}
@@ -1949,7 +1949,7 @@ vboxDomainDefineXMLFlags(virConnectPtr conn, const char *xml,
unsigned int flags
rc = gVBoxAPI.UIVirtualBox.RegisterMachine(data->vboxObj, machine);
if (NS_FAILED(rc)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("could not define a domain, rc=%08x"), (unsigned)rc);
+ _("could not define a domain, rc=%08x"), (unsigned)
rc);
goto cleanup;
}
@@ -2053,7 +2053,7 @@ static int vboxDomainUndefineFlags(virDomainPtr dom, unsigned int
flags)
ret = 0;
} else {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("could not delete the domain, rc=%08x"),
(unsigned)rc);
+ _("could not delete the domain, rc=%08x"), (unsigned)
rc);
}
vboxIIDUnalloc(&iid);
@@ -2243,7 +2243,7 @@ static int vboxDomainCreateWithFlags(virDomainPtr dom, unsigned int
flags)
rc = gVBoxAPI.UArray.vboxArrayGet(&machines, data->vboxObj,
ARRAY_GET_MACHINES);
if (NS_FAILED(rc)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not get list of machines, rc=%08x"),
(unsigned)rc);
+ _("Could not get list of machines, rc=%08x"), (unsigned)
rc);
goto cleanup;
}
@@ -2345,7 +2345,7 @@ static int vboxDomainIsActive(virDomainPtr dom)
rc = gVBoxAPI.UArray.vboxArrayGet(&machines, data->vboxObj,
ARRAY_GET_MACHINES);
if (NS_FAILED(rc)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not get list of machines, rc=%08x"),
(unsigned)rc);
+ _("Could not get list of machines, rc=%08x"), (unsigned)
rc);
return ret;
}
@@ -2761,7 +2761,7 @@ static int vboxDomainSetMemory(virDomainPtr dom, unsigned long
memory)
virReportError(VIR_ERR_INTERNAL_ERROR,
_("could not set the memory size of the "
"domain to: %lu Kb, rc=%08x"),
- memory, (unsigned)rc);
+ memory, (unsigned) rc);
}
}
gVBoxAPI.UISession.Close(data->vboxSession);
@@ -2788,7 +2788,7 @@ static int vboxDomainGetInfo(virDomainPtr dom, virDomainInfoPtr
info)
rc = gVBoxAPI.UArray.vboxArrayGet(&machines, data->vboxObj,
ARRAY_GET_MACHINES);
if (NS_FAILED(rc)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not get list of machines, rc=%08x"),
(unsigned)rc);
+ _("Could not get list of machines, rc=%08x"), (unsigned)
rc);
goto cleanup;
}
@@ -2919,7 +2919,7 @@ static int vboxDomainSetVcpusFlags(virDomainPtr dom, unsigned int
nvcpus,
virReportError(VIR_ERR_INTERNAL_ERROR,
_("could not set the number of cpus of the domain
"
"to: %u, rc=%08x"),
- CPUCount, (unsigned)rc);
+ CPUCount, (unsigned) rc);
}
VBOX_RELEASE(machine);
} else {
@@ -4205,7 +4205,7 @@ static int vboxConnectListDefinedDomains(virConnectPtr conn,
if (NS_FAILED(rc)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Could not get list of Defined Domains, rc=%08x"),
- (unsigned)rc);
+ (unsigned) rc);
goto cleanup;
}
@@ -4265,7 +4265,7 @@ static int vboxConnectNumOfDefinedDomains(virConnectPtr conn)
if (NS_FAILED(rc)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Could not get number of Defined Domains, rc=%08x"),
- (unsigned)rc);
+ (unsigned) rc);
goto cleanup;
}
@@ -4357,7 +4357,7 @@ static int vboxDomainAttachDeviceImpl(virDomainPtr dom,
if (NS_FAILED(rc)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("could not attach shared folder '%s',
rc=%08x"),
- dev->data.fs->dst, (unsigned)rc);
+ dev->data.fs->dst, (unsigned) rc);
ret = -1;
} else {
ret = 0;
@@ -4476,7 +4476,7 @@ static int vboxDomainDetachDevice(virDomainPtr dom, const char
*xml)
if (NS_FAILED(rc)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("could not detach shared folder '%s',
rc=%08x"),
- dev->data.fs->dst, (unsigned)rc);
+ dev->data.fs->dst, (unsigned) rc);
} else {
ret = 0;
}
@@ -4534,7 +4534,7 @@ static int vboxCloseDisksRecursively(virDomainPtr dom, char
*location)
if (NS_FAILED(rc)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Unable to open HardDisk, rc=%08x"),
- (unsigned)rc);
+ (unsigned) rc);
goto cleanup;
}
rc = gVBoxAPI.UIMedium.GetChildren(medium, &childrenSize, &children);
@@ -4568,7 +4568,7 @@ static int vboxCloseDisksRecursively(virDomainPtr dom, char
*location)
if (NS_FAILED(rc)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Unable to close HardDisk, rc=%08x"),
- (unsigned)rc);
+ (unsigned) rc);
goto cleanup;
}
@@ -4733,7 +4733,7 @@ vboxSnapshotRedefine(virDomainPtr dom,
if (NS_FAILED(rc)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Unable to open HardDisk, rc=%08x"),
- (unsigned)rc);
+ (unsigned) rc);
VBOX_UTF16_FREE(locationUtf);
goto cleanup;
}
@@ -4789,7 +4789,7 @@ vboxSnapshotRedefine(virDomainPtr dom,
if (NS_FAILED(rc)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Unable to close HardDisk, rc=%08x"),
- (unsigned)rc);
+ (unsigned) rc);
goto cleanup;
}
}
@@ -4841,7 +4841,7 @@ vboxSnapshotRedefine(virDomainPtr dom,
if (NS_FAILED(rc)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Unable to open HardDisk, rc=%08x"),
- (unsigned)rc);
+ (unsigned) rc);
VBOX_UTF16_FREE(locationUtf);
goto cleanup;
}
@@ -4880,7 +4880,7 @@ vboxSnapshotRedefine(virDomainPtr dom,
if (NS_FAILED(rc)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Unable to get hard disk id, rc=%08x"),
- (unsigned)rc);
+ (unsigned) rc);
VIR_FREE(uuid);
goto cleanup;
}
@@ -4891,7 +4891,7 @@ vboxSnapshotRedefine(virDomainPtr dom,
if (NS_FAILED(rc)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Unable to close HardDisk, rc=%08x"),
- (unsigned)rc);
+ (unsigned) rc);
VIR_FREE(uuid);
VIR_FREE(parentUuid);
goto cleanup;
@@ -4927,7 +4927,7 @@ vboxSnapshotRedefine(virDomainPtr dom,
if (NS_FAILED(rc)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Unable to unregister machine, rc=%08x"),
- (unsigned)rc);
+ (unsigned) rc);
goto cleanup;
}
VBOX_RELEASE(machine);
@@ -4959,7 +4959,7 @@ vboxSnapshotRedefine(virDomainPtr dom,
if (NS_FAILED(rc)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Unable to delete medium, rc=%08x"),
- (unsigned)rc);
+ (unsigned) rc);
VIR_FREE(locationUtf8);
goto cleanup;
}
@@ -5103,7 +5103,7 @@ vboxSnapshotRedefine(virDomainPtr dom,
if (NS_FAILED(rc)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Unable to open HardDisk, rc=%08x"),
- (unsigned)rc);
+ (unsigned) rc);
goto cleanup;
}
}
@@ -5136,7 +5136,7 @@ vboxSnapshotRedefine(virDomainPtr dom,
if (NS_FAILED(rc)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Unable to open HardDisk, rc=%08x"),
- (unsigned)rc);
+ (unsigned) rc);
goto cleanup;
}
VBOX_UTF16_FREE(locationUtf16);
@@ -5221,7 +5221,7 @@ vboxSnapshotRedefine(virDomainPtr dom,
if (NS_FAILED(rc)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Unable to close HardDisk, rc=%08x"),
- (unsigned)rc);
+ (unsigned) rc);
goto cleanup;
}
}
@@ -5253,7 +5253,7 @@ vboxSnapshotRedefine(virDomainPtr dom,
if (NS_FAILED(rc)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Unable to open HardDisk, rc=%08x"),
- (unsigned)rc);
+ (unsigned) rc);
VBOX_UTF16_FREE(locationUtf16);
goto cleanup;
}
@@ -5263,7 +5263,7 @@ vboxSnapshotRedefine(virDomainPtr dom,
if (NS_FAILED(rc)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Unable to get hardDisk Id, rc=%08x"),
- (unsigned)rc);
+ (unsigned) rc);
goto cleanup;
}
gVBoxAPI.UIID.vboxIIDToUtf8(data, &parentiid, &parentUuid);
@@ -5282,7 +5282,7 @@ vboxSnapshotRedefine(virDomainPtr dom,
if (NS_FAILED(rc)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Unable to create HardDisk, rc=%08x"),
- (unsigned)rc);
+ (unsigned) rc);
goto cleanup;
}
@@ -5312,7 +5312,7 @@ vboxSnapshotRedefine(virDomainPtr dom,
if (NS_FAILED(rc)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Unable to get medium uuid, rc=%08x"),
- (unsigned)rc);
+ (unsigned) rc);
goto cleanup;
}
gVBoxAPI.UIID.vboxIIDToUtf8(data, &iid, &uuid);
@@ -5361,7 +5361,7 @@ vboxSnapshotRedefine(virDomainPtr dom,
if (NS_FAILED(rc)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Unable to close the new medium, rc=%08x"),
- (unsigned)rc);
+ (unsigned) rc);
goto cleanup;
}
}
@@ -5409,14 +5409,14 @@ vboxSnapshotRedefine(virDomainPtr dom,
if (NS_FAILED(rc)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Unable to open HardDisk, rc=%08x"),
- (unsigned)rc);
+ (unsigned) rc);
goto cleanup;
}
rc = gVBoxAPI.UIMedium.Close(medium);
if (NS_FAILED(rc)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Unable to close HardDisk, rc=%08x"),
- (unsigned)rc);
+ (unsigned) rc);
goto cleanup;
}
VBOX_UTF16_FREE(locationUtf16);
@@ -5435,7 +5435,7 @@ vboxSnapshotRedefine(virDomainPtr dom,
if (NS_FAILED(rc)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Unable to open Machine, rc=%08x"),
- (unsigned)rc);
+ (unsigned) rc);
goto cleanup;
}
@@ -5443,7 +5443,7 @@ vboxSnapshotRedefine(virDomainPtr dom,
if (NS_FAILED(rc)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Unable to register Machine, rc=%08x"),
- (unsigned)rc);
+ (unsigned) rc);
goto cleanup;
}
@@ -7035,7 +7035,7 @@ vboxDomainSnapshotDeleteMetadataOnly(virDomainSnapshotPtr snapshot)
if (NS_FAILED(rc)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Unable to open HardDisk, rc=%08x"),
- (unsigned)rc);
+ (unsigned) rc);
goto cleanup;
}
@@ -7043,7 +7043,7 @@ vboxDomainSnapshotDeleteMetadataOnly(virDomainSnapshotPtr snapshot)
if (NS_FAILED(rc)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Unable to get hardDisk Id, rc=%08x"),
- (unsigned)rc);
+ (unsigned) rc);
goto cleanup;
}
gVBoxAPI.UIID.vboxIIDToUtf8(data, &parentiid, &parentUuid);
@@ -7062,7 +7062,7 @@ vboxDomainSnapshotDeleteMetadataOnly(virDomainSnapshotPtr snapshot)
if (NS_FAILED(rc)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Unable to create HardDisk, rc=%08x"),
- (unsigned)rc);
+ (unsigned) rc);
goto cleanup;
}
VBOX_UTF16_FREE(formatUtf16);
@@ -7093,7 +7093,7 @@ vboxDomainSnapshotDeleteMetadataOnly(virDomainSnapshotPtr snapshot)
if (NS_FAILED(rc)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Unable to get medium uuid, rc=%08x"),
- (unsigned)rc);
+ (unsigned) rc);
VIR_FREE(disk);
goto cleanup;
}
@@ -7145,7 +7145,7 @@ vboxDomainSnapshotDeleteMetadataOnly(virDomainSnapshotPtr snapshot)
if (NS_FAILED(rc)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Unable to close the new medium,
rc=%08x"),
- (unsigned)rc);
+ (unsigned) rc);
goto cleanup;
}
}
@@ -7227,7 +7227,7 @@ vboxDomainSnapshotDeleteMetadataOnly(virDomainSnapshotPtr snapshot)
if (NS_FAILED(rc)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Unable to unregister machine, rc=%08x"),
- (unsigned)rc);
+ (unsigned) rc);
goto cleanup;
}
VBOX_RELEASE(machine);
@@ -7249,7 +7249,7 @@ vboxDomainSnapshotDeleteMetadataOnly(virDomainSnapshotPtr snapshot)
if (NS_FAILED(rc)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Unable to delete medium, rc=%08x"),
- (unsigned)rc);
+ (unsigned) rc);
goto cleanup;
}
gVBoxAPI.UIProgress.WaitForCompletion(progress, -1);
@@ -7307,7 +7307,7 @@ vboxDomainSnapshotDeleteMetadataOnly(virDomainSnapshotPtr snapshot)
if (NS_FAILED(rc)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Unable to open Machine, rc=%08x"),
- (unsigned)rc);
+ (unsigned) rc);
goto cleanup;
}
@@ -7315,7 +7315,7 @@ vboxDomainSnapshotDeleteMetadataOnly(virDomainSnapshotPtr snapshot)
if (NS_FAILED(rc)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Unable to register Machine, rc=%08x"),
- (unsigned)rc);
+ (unsigned) rc);
goto cleanup;
}
@@ -7604,7 +7604,7 @@ vboxConnectListAllDomains(virConnectPtr conn,
rc = gVBoxAPI.UArray.vboxArrayGet(&machines, data->vboxObj,
ARRAY_GET_MACHINES);
if (NS_FAILED(rc)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not get list of domains, rc=%08x"),
(unsigned)rc);
+ _("Could not get list of domains, rc=%08x"), (unsigned)
rc);
goto cleanup;
}
@@ -7794,7 +7794,7 @@ vboxDomainHasManagedSaveImage(virDomainPtr dom, unsigned int flags)
rc = gVBoxAPI.UArray.vboxArrayGet(&machines, data->vboxObj,
ARRAY_GET_MACHINES);
if (NS_FAILED(rc)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not get list of machines, rc=%08x"),
(unsigned)rc);
+ _("Could not get list of machines, rc=%08x"), (unsigned)
rc);
return ret;
}
diff --git a/src/vbox/vbox_common.h b/src/vbox/vbox_common.h
index 5709ff8b4aba..bbffe0a6233a 100644
--- a/src/vbox/vbox_common.h
+++ b/src/vbox/vbox_common.h
@@ -395,12 +395,12 @@ typedef nsISupports IKeyboard;
# define VBOX_UTF16_TO_UTF8(arg1, arg2) gVBoxAPI.UPFN.Utf16ToUtf8(data->pFuncs, arg1,
arg2)
# define VBOX_UTF8_TO_UTF16(arg1, arg2) gVBoxAPI.UPFN.Utf8ToUtf16(data->pFuncs, arg1,
arg2)
-# define VBOX_ADDREF(arg) gVBoxAPI.nsUISupports.AddRef((void *)(arg))
+# define VBOX_ADDREF(arg) gVBoxAPI.nsUISupports.AddRef((void *) (arg))
# define VBOX_RELEASE(arg) \
do { \
if (arg) { \
- gVBoxAPI.nsUISupports.Release((void *)arg); \
+ gVBoxAPI.nsUISupports.Release((void *) arg); \
(arg) = NULL; \
} \
} while (0)
diff --git a/src/vbox/vbox_snapshot_conf.c b/src/vbox/vbox_snapshot_conf.c
index c3b2855a2dc7..890661138382 100644
--- a/src/vbox/vbox_snapshot_conf.c
+++ b/src/vbox/vbox_snapshot_conf.c
@@ -419,7 +419,7 @@ virVBoxSnapshotConfSerializeSnapshot(xmlNodePtr node,
/*hardware*/
parseError = xmlParseInNodeContext(node,
snapshot->hardware,
- (int)strlen(snapshot->hardware),
+ (int) strlen(snapshot->hardware),
0,
&hardwareNode);
if (parseError != XML_ERR_OK) {
@@ -431,7 +431,7 @@ virVBoxSnapshotConfSerializeSnapshot(xmlNodePtr node,
/*storageController*/
if (xmlParseInNodeContext(node, snapshot->storageController,
- (int)strlen(snapshot->storageController),
+ (int) strlen(snapshot->storageController),
0,
&storageControllerNode) != XML_ERR_OK) {
virReportError(VIR_ERR_XML_ERROR, "%s",
@@ -1136,7 +1136,7 @@ virVBoxSnapshotConfSaveVboxFile(virVBoxSnapshotConfMachinePtr
machine,
for (i = 0; i < machine->mediaRegistry->notherMedia; i++) {
parseError = xmlParseInNodeContext(mediaRegistryNode,
machine->mediaRegistry->otherMedia[i],
- (int)strlen(machine->mediaRegistry->otherMedia[i]),
+ (int) strlen(machine->mediaRegistry->otherMedia[i]),
0,
&cur);
if (parseError != XML_ERR_OK) {
@@ -1160,7 +1160,7 @@ virVBoxSnapshotConfSaveVboxFile(virVBoxSnapshotConfMachinePtr
machine,
parseError = xmlParseInNodeContext(machineNode,
machine->hardware,
- (int)strlen(machine->hardware),
+ (int) strlen(machine->hardware),
0,
&cur);
if (parseError != XML_ERR_OK) {
@@ -1173,7 +1173,7 @@ virVBoxSnapshotConfSaveVboxFile(virVBoxSnapshotConfMachinePtr
machine,
if (machine->extraData != NULL) {
parseError = xmlParseInNodeContext(xmlDocGetRootElement(xml),
machine->extraData,
- (int)strlen(machine->extraData),
+ (int) strlen(machine->extraData),
0,
&cur);
if (parseError != XML_ERR_OK) {
@@ -1186,7 +1186,7 @@ virVBoxSnapshotConfSaveVboxFile(virVBoxSnapshotConfMachinePtr
machine,
parseError = xmlParseInNodeContext(machineNode,
machine->storageController,
- (int)strlen(machine->storageController),
+ (int) strlen(machine->storageController),
0,
&cur);
if (parseError != XML_ERR_OK) {
diff --git a/src/vbox/vbox_storage.c b/src/vbox/vbox_storage.c
index 672caa6f9220..05e713eec017 100644
--- a/src/vbox/vbox_storage.c
+++ b/src/vbox/vbox_storage.c
@@ -101,7 +101,7 @@ static int vboxStoragePoolNumOfVolumes(virStoragePoolPtr pool)
if (NS_FAILED(rc)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("could not get number of volumes in the pool: %s,
rc=%08x"),
- pool->name, (unsigned)rc);
+ pool->name, (unsigned) rc);
return ret;
}
@@ -142,7 +142,7 @@ vboxStoragePoolListVolumes(virStoragePoolPtr pool, char **const names,
int nname
if (NS_FAILED(rc)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("could not get the volume list in the pool: %s,
rc=%08x"),
- pool->name, (unsigned)rc);
+ pool->name, (unsigned) rc);
return ret;
}
@@ -460,7 +460,7 @@ vboxStorageVolCreateXML(virStoragePoolPtr pool,
if (NS_FAILED(rc)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Could not create harddisk, rc=%08x"),
- (unsigned)rc);
+ (unsigned) rc);
goto cleanup;
}
@@ -473,7 +473,7 @@ vboxStorageVolCreateXML(virStoragePoolPtr pool,
if (NS_FAILED(rc) || !progress) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Could not create base storage, rc=%08x"),
- (unsigned)rc);
+ (unsigned) rc);
goto cleanup;
}
@@ -482,7 +482,7 @@ vboxStorageVolCreateXML(virStoragePoolPtr pool,
if (RC_FAILED(resultCode)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Could not create base storage, rc=%08x"),
- (unsigned)resultCode.uResultCode);
+ (unsigned) resultCode.uResultCode);
goto cleanup;
}
diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c
index 88792c992897..c585d9fa35d4 100644
--- a/src/vbox/vbox_tmpl.c
+++ b/src/vbox/vbox_tmpl.c
@@ -112,7 +112,7 @@ VIR_LOG_INIT("vbox.vbox_tmpl");
#define VBOX_RELEASE(arg) \
do { \
if (arg) { \
- (arg)->vtbl->nsisupports.Release((nsISupports *)(arg)); \
+ (arg)->vtbl->nsisupports.Release((nsISupports *) (arg)); \
(arg) = NULL; \
} \
} while (0)
@@ -133,17 +133,17 @@ if (strUtf16) {\
#define DEBUGUUID(msg, iid) \
{\
VIR_DEBUG("%s: {%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}", msg,\
- (unsigned)(iid)->m0,\
- (unsigned)(iid)->m1,\
- (unsigned)(iid)->m2,\
- (unsigned)(iid)->m3[0],\
- (unsigned)(iid)->m3[1],\
- (unsigned)(iid)->m3[2],\
- (unsigned)(iid)->m3[3],\
- (unsigned)(iid)->m3[4],\
- (unsigned)(iid)->m3[5],\
- (unsigned)(iid)->m3[6],\
- (unsigned)(iid)->m3[7]);\
+ (unsigned) (iid)->m0,\
+ (unsigned) (iid)->m1,\
+ (unsigned) (iid)->m2,\
+ (unsigned) (iid)->m3[0],\
+ (unsigned) (iid)->m3[1],\
+ (unsigned) (iid)->m3[2],\
+ (unsigned) (iid)->m3[3],\
+ (unsigned) (iid)->m3[4],\
+ (unsigned) (iid)->m3[5],\
+ (unsigned) (iid)->m3[6],\
+ (unsigned) (iid)->m3[7]);\
}\
#define VBOX_IID_INITIALIZER { NULL, true }
@@ -1901,7 +1901,7 @@ static nsresult _mediumDeleteStorage(IMedium *medium,
static nsresult _mediumRelease(IMedium *medium)
{
- return medium->vtbl->nsisupports.Release((nsISupports *)medium);
+ return medium->vtbl->nsisupports.Release((nsISupports *) medium);
}
static nsresult _mediumClose(IMedium *medium)
{
--
2.17.0