Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
src/hyperv/hyperv_driver.c | 60 +++++++++++++++++++-------------------
src/hyperv/hyperv_wmi.c | 12 ++++----
2 files changed, 36 insertions(+), 36 deletions(-)
diff --git a/src/hyperv/hyperv_driver.c b/src/hyperv/hyperv_driver.c
index d02c0ac3734e..e3ea0a0eb559 100644
--- a/src/hyperv/hyperv_driver.c
+++ b/src/hyperv/hyperv_driver.c
@@ -244,7 +244,7 @@ hypervConnectGetHostname(virConnectPtr conn)
ignore_value(VIR_STRDUP(hostname, computerSystem->data.common->DNSHostName));
cleanup:
- hypervFreeObject(priv, (hypervObject *)computerSystem);
+ hypervFreeObject(priv, (hypervObject *) computerSystem);
return hostname;
}
@@ -339,8 +339,8 @@ hypervNodeGetInfo(virConnectPtr conn, virNodeInfoPtr info)
result = 0;
cleanup:
- hypervFreeObject(priv, (hypervObject *)computerSystem);
- hypervFreeObject(priv, (hypervObject *)processorList);
+ hypervFreeObject(priv, (hypervObject *) computerSystem);
+ hypervFreeObject(priv, (hypervObject *) processorList);
return result;
}
@@ -382,7 +382,7 @@ hypervConnectListDomains(virConnectPtr conn, int *ids, int maxids)
success = true;
cleanup:
- hypervFreeObject(priv, (hypervObject *)computerSystemList);
+ hypervFreeObject(priv, (hypervObject *) computerSystemList);
return success ? count : -1;
}
@@ -418,7 +418,7 @@ hypervConnectNumOfDomains(virConnectPtr conn)
success = true;
cleanup:
- hypervFreeObject(priv, (hypervObject *)computerSystemList);
+ hypervFreeObject(priv, (hypervObject *) computerSystemList);
return success ? count : -1;
}
@@ -449,7 +449,7 @@ hypervDomainLookupByID(virConnectPtr conn, int id)
hypervMsvmComputerSystemToDomain(conn, computerSystem, &domain);
cleanup:
- hypervFreeObject(priv, (hypervObject *)computerSystem);
+ hypervFreeObject(priv, (hypervObject *) computerSystem);
return domain;
}
@@ -484,7 +484,7 @@ hypervDomainLookupByUUID(virConnectPtr conn, const unsigned char
*uuid)
hypervMsvmComputerSystemToDomain(conn, computerSystem, &domain);
cleanup:
- hypervFreeObject(priv, (hypervObject *)computerSystem);
+ hypervFreeObject(priv, (hypervObject *) computerSystem);
return domain;
}
@@ -516,7 +516,7 @@ hypervDomainLookupByName(virConnectPtr conn, const char *name)
hypervMsvmComputerSystemToDomain(conn, computerSystem, &domain);
cleanup:
- hypervFreeObject(priv, (hypervObject *)computerSystem);
+ hypervFreeObject(priv, (hypervObject *) computerSystem);
return domain;
}
@@ -544,7 +544,7 @@ hypervDomainSuspend(virDomainPtr domain)
(domain, MSVM_COMPUTERSYSTEM_REQUESTEDSTATE_PAUSED);
cleanup:
- hypervFreeObject(priv, (hypervObject *)computerSystem);
+ hypervFreeObject(priv, (hypervObject *) computerSystem);
return result;
}
@@ -572,7 +572,7 @@ hypervDomainResume(virDomainPtr domain)
(domain, MSVM_COMPUTERSYSTEM_REQUESTEDSTATE_ENABLED);
cleanup:
- hypervFreeObject(priv, (hypervObject *)computerSystem);
+ hypervFreeObject(priv, (hypervObject *) computerSystem);
return result;
}
@@ -603,7 +603,7 @@ hypervDomainDestroyFlags(virDomainPtr domain, unsigned int flags)
(domain, MSVM_COMPUTERSYSTEM_REQUESTEDSTATE_DISABLED);
cleanup:
- hypervFreeObject(priv, (hypervObject *)computerSystem);
+ hypervFreeObject(priv, (hypervObject *) computerSystem);
return result;
}
@@ -724,10 +724,10 @@ hypervDomainGetInfo(virDomainPtr domain, virDomainInfoPtr info)
result = 0;
cleanup:
- hypervFreeObject(priv, (hypervObject *)computerSystem);
- hypervFreeObject(priv, (hypervObject *)virtualSystemSettingData);
- hypervFreeObject(priv, (hypervObject *)processorSettingData);
- hypervFreeObject(priv, (hypervObject *)memorySettingData);
+ hypervFreeObject(priv, (hypervObject *) computerSystem);
+ hypervFreeObject(priv, (hypervObject *) virtualSystemSettingData);
+ hypervFreeObject(priv, (hypervObject *) processorSettingData);
+ hypervFreeObject(priv, (hypervObject *) memorySettingData);
return result;
}
@@ -755,7 +755,7 @@ hypervDomainGetState(virDomainPtr domain, int *state, int *reason,
result = 0;
cleanup:
- hypervFreeObject(priv, (hypervObject *)computerSystem);
+ hypervFreeObject(priv, (hypervObject *) computerSystem);
return result;
}
@@ -876,7 +876,7 @@ hypervDomainGetXMLDesc(virDomainPtr domain, unsigned int flags)
goto cleanup;
} else if (priv->wmiVersion == HYPERV_WMI_VERSION_V2 &&
virtualSystemSettingData->data.v2->Notes.data != NULL) {
- char **notes = (char **)virtualSystemSettingData->data.v2->Notes.data;
+ char **notes = (char **) virtualSystemSettingData->data.v2->Notes.data;
virBuffer buf = VIR_BUFFER_INITIALIZER;
size_t i = 0;
@@ -919,10 +919,10 @@ hypervDomainGetXMLDesc(virDomainPtr domain, unsigned int flags)
cleanup:
virDomainDefFree(def);
- hypervFreeObject(priv, (hypervObject *)computerSystem);
- hypervFreeObject(priv, (hypervObject *)virtualSystemSettingData);
- hypervFreeObject(priv, (hypervObject *)processorSettingData);
- hypervFreeObject(priv, (hypervObject *)memorySettingData);
+ hypervFreeObject(priv, (hypervObject *) computerSystem);
+ hypervFreeObject(priv, (hypervObject *) virtualSystemSettingData);
+ hypervFreeObject(priv, (hypervObject *) processorSettingData);
+ hypervFreeObject(priv, (hypervObject *) memorySettingData);
return xml;
}
@@ -975,7 +975,7 @@ hypervConnectListDefinedDomains(virConnectPtr conn, char **const
names, int maxn
count = -1;
}
- hypervFreeObject(priv, (hypervObject *)computerSystemList);
+ hypervFreeObject(priv, (hypervObject *) computerSystemList);
return count;
}
@@ -1011,7 +1011,7 @@ hypervConnectNumOfDefinedDomains(virConnectPtr conn)
success = true;
cleanup:
- hypervFreeObject(priv, (hypervObject *)computerSystemList);
+ hypervFreeObject(priv, (hypervObject *) computerSystemList);
return success ? count : -1;
}
@@ -1040,7 +1040,7 @@ hypervDomainCreateWithFlags(virDomainPtr domain, unsigned int
flags)
(domain, MSVM_COMPUTERSYSTEM_REQUESTEDSTATE_ENABLED);
cleanup:
- hypervFreeObject(priv, (hypervObject *)computerSystem);
+ hypervFreeObject(priv, (hypervObject *) computerSystem);
return result;
}
@@ -1113,7 +1113,7 @@ hypervDomainIsActive(virDomainPtr domain)
result = hypervIsMsvmComputerSystemActive(computerSystem, NULL) ? 1 : 0;
cleanup:
- hypervFreeObject(priv, (hypervObject *)computerSystem);
+ hypervFreeObject(priv, (hypervObject *) computerSystem);
return result;
}
@@ -1161,7 +1161,7 @@ hypervDomainManagedSave(virDomainPtr domain, unsigned int flags)
(domain, MSVM_COMPUTERSYSTEM_REQUESTEDSTATE_SUSPENDED);
cleanup:
- hypervFreeObject(priv, (hypervObject *)computerSystem);
+ hypervFreeObject(priv, (hypervObject *) computerSystem);
return result;
}
@@ -1184,7 +1184,7 @@ hypervDomainHasManagedSaveImage(virDomainPtr domain, unsigned int
flags)
MSVM_COMPUTERSYSTEM_ENABLEDSTATE_SUSPENDED ? 1 : 0;
cleanup:
- hypervFreeObject(priv, (hypervObject *)computerSystem);
+ hypervFreeObject(priv, (hypervObject *) computerSystem);
return result;
}
@@ -1214,7 +1214,7 @@ hypervDomainManagedSaveRemove(virDomainPtr domain, unsigned int
flags)
(domain, MSVM_COMPUTERSYSTEM_REQUESTEDSTATE_DISABLED);
cleanup:
- hypervFreeObject(priv, (hypervObject *)computerSystem);
+ hypervFreeObject(priv, (hypervObject *) computerSystem);
return result;
}
@@ -1344,7 +1344,7 @@ hypervConnectListAllDomains(virConnectPtr conn,
VIR_FREE(doms);
}
- hypervFreeObject(priv, (hypervObject *)computerSystemList);
+ hypervFreeObject(priv, (hypervObject *) computerSystemList);
return ret;
}
@@ -1367,7 +1367,7 @@ hypervDomainSendKey(virDomainPtr domain, unsigned int codeset,
Msvm_Keyboard *keyboard = NULL;
virBuffer query = VIR_BUFFER_INITIALIZER;
hypervInvokeParamsListPtr params = NULL;
- char keycodeStr[INT_BUFSIZE_BOUND(int)];
+ char keycodeStr[INT_BUFSIZE_BOUND(int) ];
virCheckFlags(0, -1);
diff --git a/src/hyperv/hyperv_wmi.c b/src/hyperv/hyperv_wmi.c
index 5e2b3d7edf5b..37389d0661c0 100644
--- a/src/hyperv/hyperv_wmi.c
+++ b/src/hyperv/hyperv_wmi.c
@@ -733,7 +733,7 @@ hypervSerializeEmbeddedParam(hypervParamPtr p, const char
*resourceUri,
ws_xml_dump_memory_node_tree(xmlNodeInstance, &cdataContent, &len);
if (!(xmlNodeCdata = xmlNewCDataBlock((xmlDocPtr) xmlDocCdata,
- (xmlChar *)cdataContent, len))) {
+ (xmlChar *) cdataContent, len))) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Could not create CDATA element"));
goto cleanup;
@@ -745,7 +745,7 @@ hypervSerializeEmbeddedParam(hypervParamPtr p, const char
*resourceUri,
* FIXME: there is no openwsman wrapper for xmlNewCDataBlock, so instead
* silence clang alignment warnings by casting to a void pointer first
*/
- if (!(xmlAddChild((xmlNodePtr)(void *)xmlNodeParam, xmlNodeCdata))) {
+ if (!(xmlAddChild((xmlNodePtr)(void *) xmlNodeParam, xmlNodeCdata))) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Could not add CDATA to doc root"));
goto cleanup;
@@ -1368,7 +1368,7 @@ hypervInvokeMsvmComputerSystemRequestStateChange(virDomainPtr
domain,
goto cleanup;
/* Check return value */
- returnValue = ws_xml_get_xpath_value(response, (char
*)"/s:Envelope/s:Body/p:RequestStateChange_OUTPUT/p:ReturnValue");
+ returnValue = ws_xml_get_xpath_value(response, (char *)
"/s:Envelope/s:Body/p:RequestStateChange_OUTPUT/p:ReturnValue");
if (returnValue == NULL) {
virReportError(VIR_ERR_INTERNAL_ERROR,
@@ -1385,7 +1385,7 @@ hypervInvokeMsvmComputerSystemRequestStateChange(virDomainPtr
domain,
if (returnCode == CIM_RETURNCODE_TRANSITION_STARTED) {
/* Get concrete job object */
- instanceID = ws_xml_get_xpath_value(response, (char
*)"/s:Envelope/s:Body/p:RequestStateChange_OUTPUT/p:Job/a:ReferenceParameters/w:SelectorSet/w:Selector[@Name='InstanceID']");
+ instanceID = ws_xml_get_xpath_value(response, (char *)
"/s:Envelope/s:Body/p:RequestStateChange_OUTPUT/p:Job/a:ReferenceParameters/w:SelectorSet/w:Selector[@Name='InstanceID']");
if (instanceID == NULL) {
virReportError(VIR_ERR_INTERNAL_ERROR,
@@ -1415,7 +1415,7 @@ hypervInvokeMsvmComputerSystemRequestStateChange(virDomainPtr
domain,
case MSVM_CONCRETEJOB_JOBSTATE_STARTING:
case MSVM_CONCRETEJOB_JOBSTATE_RUNNING:
case MSVM_CONCRETEJOB_JOBSTATE_SHUTTING_DOWN:
- hypervFreeObject(priv, (hypervObject *)concreteJob);
+ hypervFreeObject(priv, (hypervObject *) concreteJob);
concreteJob = NULL;
usleep(100 * 1000);
@@ -1460,7 +1460,7 @@ hypervInvokeMsvmComputerSystemRequestStateChange(virDomainPtr
domain,
VIR_FREE(properties);
VIR_FREE(returnValue);
VIR_FREE(instanceID);
- hypervFreeObject(priv, (hypervObject *)concreteJob);
+ hypervFreeObject(priv, (hypervObject *) concreteJob);
return result;
}
--
2.17.0