You need to sign in or sign up before continuing.
提交 af253617 编写于 作者: M Matthias Bolte

esx: Remove unnecessary casts

上级 376b311d
...@@ -558,7 +558,7 @@ esxOpen(virConnectPtr conn, virConnectAuthPtr auth, int flags ATTRIBUTE_UNUSED) ...@@ -558,7 +558,7 @@ esxOpen(virConnectPtr conn, virConnectAuthPtr auth, int flags ATTRIBUTE_UNUSED)
static int static int
esxClose(virConnectPtr conn) esxClose(virConnectPtr conn)
{ {
esxPrivate *priv = (esxPrivate *)conn->privateData; esxPrivate *priv = conn->privateData;
esxVI_EnsureSession(priv->host); esxVI_EnsureSession(priv->host);
...@@ -645,7 +645,7 @@ esxSupportsVMotion(esxPrivate *priv) ...@@ -645,7 +645,7 @@ esxSupportsVMotion(esxPrivate *priv)
static int static int
esxSupportsFeature(virConnectPtr conn, int feature) esxSupportsFeature(virConnectPtr conn, int feature)
{ {
esxPrivate *priv = (esxPrivate *)conn->privateData; esxPrivate *priv = conn->privateData;
esxVI_Boolean supportsVMotion = esxVI_Boolean_Undefined; esxVI_Boolean supportsVMotion = esxVI_Boolean_Undefined;
switch (feature) { switch (feature) {
...@@ -678,7 +678,7 @@ esxGetType(virConnectPtr conn ATTRIBUTE_UNUSED) ...@@ -678,7 +678,7 @@ esxGetType(virConnectPtr conn ATTRIBUTE_UNUSED)
static int static int
esxGetVersion(virConnectPtr conn, unsigned long *version) esxGetVersion(virConnectPtr conn, unsigned long *version)
{ {
esxPrivate *priv = (esxPrivate *)conn->privateData; esxPrivate *priv = conn->privateData;
char *temp; char *temp;
unsigned int major, minor, release; unsigned int major, minor, release;
...@@ -716,7 +716,7 @@ esxGetVersion(virConnectPtr conn, unsigned long *version) ...@@ -716,7 +716,7 @@ esxGetVersion(virConnectPtr conn, unsigned long *version)
static char * static char *
esxGetHostname(virConnectPtr conn) esxGetHostname(virConnectPtr conn)
{ {
esxPrivate *priv = (esxPrivate *)conn->privateData; esxPrivate *priv = conn->privateData;
esxVI_String *propertyNameList = NULL; esxVI_String *propertyNameList = NULL;
esxVI_ObjectContent *hostSystem = NULL; esxVI_ObjectContent *hostSystem = NULL;
esxVI_DynamicProperty *dynamicProperty = NULL; esxVI_DynamicProperty *dynamicProperty = NULL;
...@@ -805,7 +805,7 @@ static int ...@@ -805,7 +805,7 @@ static int
esxNodeGetInfo(virConnectPtr conn, virNodeInfoPtr nodeinfo) esxNodeGetInfo(virConnectPtr conn, virNodeInfoPtr nodeinfo)
{ {
int result = 0; int result = 0;
esxPrivate *priv = (esxPrivate *)conn->privateData; esxPrivate *priv = conn->privateData;
esxVI_String *propertyNameList = NULL; esxVI_String *propertyNameList = NULL;
esxVI_ObjectContent *hostSystem = NULL; esxVI_ObjectContent *hostSystem = NULL;
esxVI_DynamicProperty *dynamicProperty = NULL; esxVI_DynamicProperty *dynamicProperty = NULL;
...@@ -958,7 +958,7 @@ esxNodeGetInfo(virConnectPtr conn, virNodeInfoPtr nodeinfo) ...@@ -958,7 +958,7 @@ esxNodeGetInfo(virConnectPtr conn, virNodeInfoPtr nodeinfo)
static char * static char *
esxGetCapabilities(virConnectPtr conn) esxGetCapabilities(virConnectPtr conn)
{ {
esxPrivate *priv = (esxPrivate *)conn->privateData; esxPrivate *priv = conn->privateData;
char *xml = virCapabilitiesFormatXML(priv->caps); char *xml = virCapabilitiesFormatXML(priv->caps);
if (xml == NULL) { if (xml == NULL) {
...@@ -974,7 +974,7 @@ esxGetCapabilities(virConnectPtr conn) ...@@ -974,7 +974,7 @@ esxGetCapabilities(virConnectPtr conn)
static int static int
esxListDomains(virConnectPtr conn, int *ids, int maxids) esxListDomains(virConnectPtr conn, int *ids, int maxids)
{ {
esxPrivate *priv = (esxPrivate *)conn->privateData; esxPrivate *priv = conn->privateData;
esxVI_ObjectContent *virtualMachineList = NULL; esxVI_ObjectContent *virtualMachineList = NULL;
esxVI_ObjectContent *virtualMachine = NULL; esxVI_ObjectContent *virtualMachine = NULL;
esxVI_String *propertyNameList = NULL; esxVI_String *propertyNameList = NULL;
...@@ -1046,7 +1046,7 @@ esxListDomains(virConnectPtr conn, int *ids, int maxids) ...@@ -1046,7 +1046,7 @@ esxListDomains(virConnectPtr conn, int *ids, int maxids)
static int static int
esxNumberOfDomains(virConnectPtr conn) esxNumberOfDomains(virConnectPtr conn)
{ {
esxPrivate *priv = (esxPrivate *)conn->privateData; esxPrivate *priv = conn->privateData;
if (esxVI_EnsureSession(priv->host) < 0) { if (esxVI_EnsureSession(priv->host) < 0) {
return -1; return -1;
...@@ -1062,7 +1062,7 @@ esxNumberOfDomains(virConnectPtr conn) ...@@ -1062,7 +1062,7 @@ esxNumberOfDomains(virConnectPtr conn)
static virDomainPtr static virDomainPtr
esxDomainLookupByID(virConnectPtr conn, int id) esxDomainLookupByID(virConnectPtr conn, int id)
{ {
esxPrivate *priv = (esxPrivate *)conn->privateData; esxPrivate *priv = conn->privateData;
esxVI_String *propertyNameList = NULL; esxVI_String *propertyNameList = NULL;
esxVI_ObjectContent *virtualMachineList = NULL; esxVI_ObjectContent *virtualMachineList = NULL;
esxVI_ObjectContent *virtualMachine = NULL; esxVI_ObjectContent *virtualMachine = NULL;
...@@ -1145,7 +1145,7 @@ esxDomainLookupByID(virConnectPtr conn, int id) ...@@ -1145,7 +1145,7 @@ esxDomainLookupByID(virConnectPtr conn, int id)
static virDomainPtr static virDomainPtr
esxDomainLookupByUUID(virConnectPtr conn, const unsigned char *uuid) esxDomainLookupByUUID(virConnectPtr conn, const unsigned char *uuid)
{ {
esxPrivate *priv = (esxPrivate *)conn->privateData; esxPrivate *priv = conn->privateData;
esxVI_String *propertyNameList = NULL; esxVI_String *propertyNameList = NULL;
esxVI_ObjectContent *virtualMachine = NULL; esxVI_ObjectContent *virtualMachine = NULL;
esxVI_VirtualMachinePowerState powerState; esxVI_VirtualMachinePowerState powerState;
...@@ -1199,7 +1199,7 @@ esxDomainLookupByUUID(virConnectPtr conn, const unsigned char *uuid) ...@@ -1199,7 +1199,7 @@ esxDomainLookupByUUID(virConnectPtr conn, const unsigned char *uuid)
static virDomainPtr static virDomainPtr
esxDomainLookupByName(virConnectPtr conn, const char *name) esxDomainLookupByName(virConnectPtr conn, const char *name)
{ {
esxPrivate *priv = (esxPrivate *)conn->privateData; esxPrivate *priv = conn->privateData;
esxVI_String *propertyNameList = NULL; esxVI_String *propertyNameList = NULL;
esxVI_ObjectContent *virtualMachineList = NULL; esxVI_ObjectContent *virtualMachineList = NULL;
esxVI_ObjectContent *virtualMachine = NULL; esxVI_ObjectContent *virtualMachine = NULL;
...@@ -1283,7 +1283,7 @@ static int ...@@ -1283,7 +1283,7 @@ static int
esxDomainSuspend(virDomainPtr domain) esxDomainSuspend(virDomainPtr domain)
{ {
int result = 0; int result = 0;
esxPrivate *priv = (esxPrivate *)domain->conn->privateData; esxPrivate *priv = domain->conn->privateData;
esxVI_ObjectContent *virtualMachine = NULL; esxVI_ObjectContent *virtualMachine = NULL;
esxVI_String *propertyNameList = NULL; esxVI_String *propertyNameList = NULL;
esxVI_VirtualMachinePowerState powerState; esxVI_VirtualMachinePowerState powerState;
...@@ -1338,7 +1338,7 @@ static int ...@@ -1338,7 +1338,7 @@ static int
esxDomainResume(virDomainPtr domain) esxDomainResume(virDomainPtr domain)
{ {
int result = 0; int result = 0;
esxPrivate *priv = (esxPrivate *)domain->conn->privateData; esxPrivate *priv = domain->conn->privateData;
esxVI_ObjectContent *virtualMachine = NULL; esxVI_ObjectContent *virtualMachine = NULL;
esxVI_String *propertyNameList = NULL; esxVI_String *propertyNameList = NULL;
esxVI_VirtualMachinePowerState powerState; esxVI_VirtualMachinePowerState powerState;
...@@ -1393,7 +1393,7 @@ static int ...@@ -1393,7 +1393,7 @@ static int
esxDomainShutdown(virDomainPtr domain) esxDomainShutdown(virDomainPtr domain)
{ {
int result = 0; int result = 0;
esxPrivate *priv = (esxPrivate *)domain->conn->privateData; esxPrivate *priv = domain->conn->privateData;
esxVI_ObjectContent *virtualMachine = NULL; esxVI_ObjectContent *virtualMachine = NULL;
esxVI_String *propertyNameList = NULL; esxVI_String *propertyNameList = NULL;
esxVI_VirtualMachinePowerState powerState; esxVI_VirtualMachinePowerState powerState;
...@@ -1438,7 +1438,7 @@ static int ...@@ -1438,7 +1438,7 @@ static int
esxDomainReboot(virDomainPtr domain, unsigned int flags ATTRIBUTE_UNUSED) esxDomainReboot(virDomainPtr domain, unsigned int flags ATTRIBUTE_UNUSED)
{ {
int result = 0; int result = 0;
esxPrivate *priv = (esxPrivate *)domain->conn->privateData; esxPrivate *priv = domain->conn->privateData;
esxVI_ObjectContent *virtualMachine = NULL; esxVI_ObjectContent *virtualMachine = NULL;
esxVI_String *propertyNameList = NULL; esxVI_String *propertyNameList = NULL;
esxVI_VirtualMachinePowerState powerState; esxVI_VirtualMachinePowerState powerState;
...@@ -1483,7 +1483,7 @@ static int ...@@ -1483,7 +1483,7 @@ static int
esxDomainDestroy(virDomainPtr domain) esxDomainDestroy(virDomainPtr domain)
{ {
int result = 0; int result = 0;
esxPrivate *priv = (esxPrivate *)domain->conn->privateData; esxPrivate *priv = domain->conn->privateData;
esxVI_Context *ctx = NULL; esxVI_Context *ctx = NULL;
esxVI_ObjectContent *virtualMachine = NULL; esxVI_ObjectContent *virtualMachine = NULL;
esxVI_String *propertyNameList = NULL; esxVI_String *propertyNameList = NULL;
...@@ -1559,7 +1559,7 @@ esxDomainGetOSType(virDomainPtr domain ATTRIBUTE_UNUSED) ...@@ -1559,7 +1559,7 @@ esxDomainGetOSType(virDomainPtr domain ATTRIBUTE_UNUSED)
static unsigned long static unsigned long
esxDomainGetMaxMemory(virDomainPtr domain) esxDomainGetMaxMemory(virDomainPtr domain)
{ {
esxPrivate *priv = (esxPrivate *)domain->conn->privateData; esxPrivate *priv = domain->conn->privateData;
esxVI_String *propertyNameList = NULL; esxVI_String *propertyNameList = NULL;
esxVI_ObjectContent *virtualMachine = NULL; esxVI_ObjectContent *virtualMachine = NULL;
esxVI_DynamicProperty *dynamicProperty = NULL; esxVI_DynamicProperty *dynamicProperty = NULL;
...@@ -1616,7 +1616,7 @@ static int ...@@ -1616,7 +1616,7 @@ static int
esxDomainSetMaxMemory(virDomainPtr domain, unsigned long memory) esxDomainSetMaxMemory(virDomainPtr domain, unsigned long memory)
{ {
int result = 0; int result = 0;
esxPrivate *priv = (esxPrivate *)domain->conn->privateData; esxPrivate *priv = domain->conn->privateData;
esxVI_ObjectContent *virtualMachine = NULL; esxVI_ObjectContent *virtualMachine = NULL;
esxVI_VirtualMachineConfigSpec *spec = NULL; esxVI_VirtualMachineConfigSpec *spec = NULL;
esxVI_ManagedObjectReference *task = NULL; esxVI_ManagedObjectReference *task = NULL;
...@@ -1669,7 +1669,7 @@ static int ...@@ -1669,7 +1669,7 @@ static int
esxDomainSetMemory(virDomainPtr domain, unsigned long memory) esxDomainSetMemory(virDomainPtr domain, unsigned long memory)
{ {
int result = 0; int result = 0;
esxPrivate *priv = (esxPrivate *)domain->conn->privateData; esxPrivate *priv = domain->conn->privateData;
esxVI_ObjectContent *virtualMachine = NULL; esxVI_ObjectContent *virtualMachine = NULL;
esxVI_VirtualMachineConfigSpec *spec = NULL; esxVI_VirtualMachineConfigSpec *spec = NULL;
esxVI_ManagedObjectReference *task = NULL; esxVI_ManagedObjectReference *task = NULL;
...@@ -1723,7 +1723,7 @@ static int ...@@ -1723,7 +1723,7 @@ static int
esxDomainGetInfo(virDomainPtr domain, virDomainInfoPtr info) esxDomainGetInfo(virDomainPtr domain, virDomainInfoPtr info)
{ {
int result = 0; int result = 0;
esxPrivate *priv = (esxPrivate *)domain->conn->privateData; esxPrivate *priv = domain->conn->privateData;
esxVI_String *propertyNameList = NULL; esxVI_String *propertyNameList = NULL;
esxVI_ObjectContent *virtualMachine = NULL; esxVI_ObjectContent *virtualMachine = NULL;
esxVI_DynamicProperty *dynamicProperty = NULL; esxVI_DynamicProperty *dynamicProperty = NULL;
...@@ -1978,7 +1978,7 @@ static int ...@@ -1978,7 +1978,7 @@ static int
esxDomainSetVcpus(virDomainPtr domain, unsigned int nvcpus) esxDomainSetVcpus(virDomainPtr domain, unsigned int nvcpus)
{ {
int result = 0; int result = 0;
esxPrivate *priv = (esxPrivate *)domain->conn->privateData; esxPrivate *priv = domain->conn->privateData;
int maxVcpus; int maxVcpus;
esxVI_ObjectContent *virtualMachine = NULL; esxVI_ObjectContent *virtualMachine = NULL;
esxVI_VirtualMachineConfigSpec *spec = NULL; esxVI_VirtualMachineConfigSpec *spec = NULL;
...@@ -2050,7 +2050,7 @@ esxDomainSetVcpus(virDomainPtr domain, unsigned int nvcpus) ...@@ -2050,7 +2050,7 @@ esxDomainSetVcpus(virDomainPtr domain, unsigned int nvcpus)
static int static int
esxDomainGetMaxVcpus(virDomainPtr domain) esxDomainGetMaxVcpus(virDomainPtr domain)
{ {
esxPrivate *priv = (esxPrivate *)domain->conn->privateData; esxPrivate *priv = domain->conn->privateData;
esxVI_String *propertyNameList = NULL; esxVI_String *propertyNameList = NULL;
esxVI_ObjectContent *hostSystem = NULL; esxVI_ObjectContent *hostSystem = NULL;
esxVI_DynamicProperty *dynamicProperty = NULL; esxVI_DynamicProperty *dynamicProperty = NULL;
...@@ -2109,7 +2109,7 @@ esxDomainGetMaxVcpus(virDomainPtr domain) ...@@ -2109,7 +2109,7 @@ esxDomainGetMaxVcpus(virDomainPtr domain)
static char * static char *
esxDomainDumpXML(virDomainPtr domain, int flags) esxDomainDumpXML(virDomainPtr domain, int flags)
{ {
esxPrivate *priv = (esxPrivate *)domain->conn->privateData; esxPrivate *priv = domain->conn->privateData;
esxVI_String *propertyNameList = NULL; esxVI_String *propertyNameList = NULL;
esxVI_ObjectContent *virtualMachine = NULL; esxVI_ObjectContent *virtualMachine = NULL;
esxVI_DynamicProperty *dynamicProperty = NULL; esxVI_DynamicProperty *dynamicProperty = NULL;
...@@ -2211,7 +2211,7 @@ esxDomainXMLFromNative(virConnectPtr conn, const char *nativeFormat, ...@@ -2211,7 +2211,7 @@ esxDomainXMLFromNative(virConnectPtr conn, const char *nativeFormat,
const char *nativeConfig, const char *nativeConfig,
unsigned int flags ATTRIBUTE_UNUSED) unsigned int flags ATTRIBUTE_UNUSED)
{ {
esxPrivate *priv = (esxPrivate *)conn->privateData; esxPrivate *priv = conn->privateData;
virDomainDefPtr def = NULL; virDomainDefPtr def = NULL;
char *xml = NULL; char *xml = NULL;
...@@ -2240,7 +2240,7 @@ esxDomainXMLToNative(virConnectPtr conn, const char *nativeFormat, ...@@ -2240,7 +2240,7 @@ esxDomainXMLToNative(virConnectPtr conn, const char *nativeFormat,
const char *domainXml, const char *domainXml,
unsigned int flags ATTRIBUTE_UNUSED) unsigned int flags ATTRIBUTE_UNUSED)
{ {
esxPrivate *priv = (esxPrivate *)conn->privateData; esxPrivate *priv = conn->privateData;
virDomainDefPtr def = NULL; virDomainDefPtr def = NULL;
char *vmx = NULL; char *vmx = NULL;
...@@ -2268,7 +2268,7 @@ esxDomainXMLToNative(virConnectPtr conn, const char *nativeFormat, ...@@ -2268,7 +2268,7 @@ esxDomainXMLToNative(virConnectPtr conn, const char *nativeFormat,
static int static int
esxListDefinedDomains(virConnectPtr conn, char **const names, int maxnames) esxListDefinedDomains(virConnectPtr conn, char **const names, int maxnames)
{ {
esxPrivate *priv = (esxPrivate *)conn->privateData; esxPrivate *priv = conn->privateData;
esxVI_String *propertyNameList = NULL; esxVI_String *propertyNameList = NULL;
esxVI_ObjectContent *virtualMachineList = NULL; esxVI_ObjectContent *virtualMachineList = NULL;
esxVI_ObjectContent *virtualMachine = NULL; esxVI_ObjectContent *virtualMachine = NULL;
...@@ -2358,7 +2358,7 @@ esxListDefinedDomains(virConnectPtr conn, char **const names, int maxnames) ...@@ -2358,7 +2358,7 @@ esxListDefinedDomains(virConnectPtr conn, char **const names, int maxnames)
static int static int
esxNumberOfDefinedDomains(virConnectPtr conn) esxNumberOfDefinedDomains(virConnectPtr conn)
{ {
esxPrivate *priv = (esxPrivate *)conn->privateData; esxPrivate *priv = conn->privateData;
if (esxVI_EnsureSession(priv->host) < 0) { if (esxVI_EnsureSession(priv->host) < 0) {
return -1; return -1;
...@@ -2375,7 +2375,7 @@ static int ...@@ -2375,7 +2375,7 @@ static int
esxDomainCreate(virDomainPtr domain) esxDomainCreate(virDomainPtr domain)
{ {
int result = 0; int result = 0;
esxPrivate *priv = (esxPrivate *)domain->conn->privateData; esxPrivate *priv = domain->conn->privateData;
esxVI_ObjectContent *virtualMachine = NULL; esxVI_ObjectContent *virtualMachine = NULL;
esxVI_String *propertyNameList = NULL; esxVI_String *propertyNameList = NULL;
esxVI_VirtualMachinePowerState powerState; esxVI_VirtualMachinePowerState powerState;
...@@ -2430,7 +2430,7 @@ esxDomainCreate(virDomainPtr domain) ...@@ -2430,7 +2430,7 @@ esxDomainCreate(virDomainPtr domain)
static virDomainPtr static virDomainPtr
esxDomainDefineXML(virConnectPtr conn, const char *xml ATTRIBUTE_UNUSED) esxDomainDefineXML(virConnectPtr conn, const char *xml ATTRIBUTE_UNUSED)
{ {
esxPrivate *priv = (esxPrivate *)conn->privateData; esxPrivate *priv = conn->privateData;
virDomainDefPtr def = NULL; virDomainDefPtr def = NULL;
char *vmx = NULL; char *vmx = NULL;
int i; int i;
...@@ -2638,7 +2638,7 @@ static int ...@@ -2638,7 +2638,7 @@ static int
esxDomainUndefine(virDomainPtr domain) esxDomainUndefine(virDomainPtr domain)
{ {
int result = 0; int result = 0;
esxPrivate *priv = (esxPrivate *)domain->conn->privateData; esxPrivate *priv = domain->conn->privateData;
esxVI_Context *ctx = NULL; esxVI_Context *ctx = NULL;
esxVI_ObjectContent *virtualMachine = NULL; esxVI_ObjectContent *virtualMachine = NULL;
esxVI_String *propertyNameList = NULL; esxVI_String *propertyNameList = NULL;
...@@ -2740,7 +2740,7 @@ esxDomainGetSchedulerParameters(virDomainPtr domain, ...@@ -2740,7 +2740,7 @@ esxDomainGetSchedulerParameters(virDomainPtr domain,
virSchedParameterPtr params, int *nparams) virSchedParameterPtr params, int *nparams)
{ {
int result = 0; int result = 0;
esxPrivate *priv = (esxPrivate *)domain->conn->privateData; esxPrivate *priv = domain->conn->privateData;
esxVI_String *propertyNameList = NULL; esxVI_String *propertyNameList = NULL;
esxVI_ObjectContent *virtualMachine = NULL; esxVI_ObjectContent *virtualMachine = NULL;
esxVI_DynamicProperty *dynamicProperty = NULL; esxVI_DynamicProperty *dynamicProperty = NULL;
...@@ -2869,7 +2869,7 @@ esxDomainSetSchedulerParameters(virDomainPtr domain, ...@@ -2869,7 +2869,7 @@ esxDomainSetSchedulerParameters(virDomainPtr domain,
virSchedParameterPtr params, int nparams) virSchedParameterPtr params, int nparams)
{ {
int result = 0; int result = 0;
esxPrivate *priv = (esxPrivate *)domain->conn->privateData; esxPrivate *priv = domain->conn->privateData;
esxVI_ObjectContent *virtualMachine = NULL; esxVI_ObjectContent *virtualMachine = NULL;
esxVI_VirtualMachineConfigSpec *spec = NULL; esxVI_VirtualMachineConfigSpec *spec = NULL;
esxVI_SharesInfo *sharesInfo = NULL; esxVI_SharesInfo *sharesInfo = NULL;
...@@ -3040,7 +3040,7 @@ esxDomainMigratePerform(virDomainPtr domain, ...@@ -3040,7 +3040,7 @@ esxDomainMigratePerform(virDomainPtr domain,
unsigned long bandwidth ATTRIBUTE_UNUSED) unsigned long bandwidth ATTRIBUTE_UNUSED)
{ {
int result = 0; int result = 0;
esxPrivate *priv = (esxPrivate *)domain->conn->privateData; esxPrivate *priv = domain->conn->privateData;
xmlURIPtr xmlUri = NULL; xmlURIPtr xmlUri = NULL;
char hostIpAddress[NI_MAXHOST] = ""; char hostIpAddress[NI_MAXHOST] = "";
esxVI_ObjectContent *virtualMachine = NULL; esxVI_ObjectContent *virtualMachine = NULL;
...@@ -3171,7 +3171,7 @@ static unsigned long long ...@@ -3171,7 +3171,7 @@ static unsigned long long
esxNodeGetFreeMemory(virConnectPtr conn) esxNodeGetFreeMemory(virConnectPtr conn)
{ {
unsigned long long result = 0; unsigned long long result = 0;
esxPrivate *priv = (esxPrivate *)conn->privateData; esxPrivate *priv = conn->privateData;
esxVI_String *propertyNameList = NULL; esxVI_String *propertyNameList = NULL;
esxVI_ObjectContent *hostSystem = NULL; esxVI_ObjectContent *hostSystem = NULL;
esxVI_ManagedObjectReference *managedObjectReference = NULL; esxVI_ManagedObjectReference *managedObjectReference = NULL;
...@@ -3249,7 +3249,7 @@ esxNodeGetFreeMemory(virConnectPtr conn) ...@@ -3249,7 +3249,7 @@ esxNodeGetFreeMemory(virConnectPtr conn)
static int static int
esxIsEncrypted(virConnectPtr conn) esxIsEncrypted(virConnectPtr conn)
{ {
esxPrivate *priv = (esxPrivate *)conn->privateData; esxPrivate *priv = conn->privateData;
if (STRCASEEQ(priv->transport, "https")) { if (STRCASEEQ(priv->transport, "https")) {
return 1; return 1;
...@@ -3263,7 +3263,7 @@ esxIsEncrypted(virConnectPtr conn) ...@@ -3263,7 +3263,7 @@ esxIsEncrypted(virConnectPtr conn)
static int static int
esxIsSecure(virConnectPtr conn) esxIsSecure(virConnectPtr conn)
{ {
esxPrivate *priv = (esxPrivate *)conn->privateData; esxPrivate *priv = conn->privateData;
if (STRCASEEQ(priv->transport, "https")) { if (STRCASEEQ(priv->transport, "https")) {
return 1; return 1;
...@@ -3278,7 +3278,7 @@ static int ...@@ -3278,7 +3278,7 @@ static int
esxDomainIsActive(virDomainPtr domain) esxDomainIsActive(virDomainPtr domain)
{ {
int result = 0; int result = 0;
esxPrivate *priv = (esxPrivate *)domain->conn->privateData; esxPrivate *priv = domain->conn->privateData;
esxVI_ObjectContent *virtualMachine = NULL; esxVI_ObjectContent *virtualMachine = NULL;
esxVI_String *propertyNameList = NULL; esxVI_String *propertyNameList = NULL;
esxVI_VirtualMachinePowerState powerState; esxVI_VirtualMachinePowerState powerState;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册