Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
src/conf/capabilities.c | 4 +-
src/conf/domain_audit.c | 6 +--
src/conf/domain_capabilities.c | 2 +-
src/conf/domain_conf.c | 76 +++++++++++++++++-----------------
src/conf/network_conf.c | 2 +-
src/conf/node_device_conf.c | 2 +-
src/conf/nwfilter_conf.c | 6 +--
src/conf/nwfilter_params.c | 8 ++--
src/conf/snapshot_conf.c | 2 +-
src/conf/virnetworkobj.c | 2 +-
src/conf/virsecretobj.c | 6 +--
src/conf/virstorageobj.c | 4 +-
12 files changed, 60 insertions(+), 60 deletions(-)
diff --git a/src/conf/capabilities.c b/src/conf/capabilities.c
index c4ee7efb5fe2..46a51e513204 100644
--- a/src/conf/capabilities.c
+++ b/src/conf/capabilities.c
@@ -1578,8 +1578,8 @@ static int
virCapsHostCacheBankSorter(const void *a,
const void *b)
{
- virCapsHostCacheBankPtr ca = *(virCapsHostCacheBankPtr *)a;
- virCapsHostCacheBankPtr cb = *(virCapsHostCacheBankPtr *)b;
+ virCapsHostCacheBankPtr ca = *(virCapsHostCacheBankPtr *) a;
+ virCapsHostCacheBankPtr cb = *(virCapsHostCacheBankPtr *) b;
if (ca->level < cb->level)
return -1;
diff --git a/src/conf/domain_audit.c b/src/conf/domain_audit.c
index 82868bca76b0..182422e9e8a2 100644
--- a/src/conf/domain_audit.c
+++ b/src/conf/domain_audit.c
@@ -804,7 +804,7 @@ virDomainAuditLifecycle(virDomainObjPtr vm, const char *op,
VIR_AUDIT(VIR_AUDIT_RECORD_MACHINE_CONTROL, success,
"virt=%s op=%s reason=%s %s uuid=%s vm-pid=%lld",
- virt, op, reason, vmname, uuidstr, (long long)vm->pid);
+ virt, op, reason, vmname, uuidstr, (long long) vm->pid);
VIR_FREE(vmname);
}
@@ -904,8 +904,8 @@ virDomainAuditInit(virDomainObjPtr vm,
VIR_AUDIT(VIR_AUDIT_RECORD_MACHINE_CONTROL, true,
"virt=%s op=init %s uuid=%s vm-pid=%lld init-pid=%lld
pid-ns=%lld",
- virt, vmname, uuidstr, (long long)vm->pid, (long long)initpid,
- (long long)pidns);
+ virt, vmname, uuidstr, (long long) vm->pid, (long long) initpid,
+ (long long) pidns);
VIR_FREE(vmname);
}
diff --git a/src/conf/domain_capabilities.c b/src/conf/domain_capabilities.c
index bebbaf44d00e..8ca960d0b548 100644
--- a/src/conf/domain_capabilities.c
+++ b/src/conf/domain_capabilities.c
@@ -238,7 +238,7 @@ virDomainCapsCPUModelsAdd(virDomainCapsCPUModelsPtr cpuModels,
if (VIR_STRNDUP(nameCopy, name, nameLen) < 0)
goto error;
- if (virStringListCopy(&blockersCopy, (const char **)blockers) < 0)
+ if (virStringListCopy(&blockersCopy, (const char **) blockers) < 0)
goto error;
if (virDomainCapsCPUModelsAddSteal(cpuModels, &nameCopy,
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 65b429460a30..73415c16dc94 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -1232,9 +1232,9 @@ virDomainBlkioDeviceParseXML(xmlNodePtr root,
while (node) {
if (node->type == XML_ELEMENT_NODE) {
if (virXMLNodeNameEqual(node, "path") && !dev->path) {
- dev->path = (char *)xmlNodeGetContent(node);
+ dev->path = (char *) xmlNodeGetContent(node);
} else if (virXMLNodeNameEqual(node, "weight")) {
- c = (char *)xmlNodeGetContent(node);
+ c = (char *) xmlNodeGetContent(node);
if (virStrToLong_ui(c, NULL, 10, &dev->weight) < 0) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("could not parse weight %s"),
@@ -1243,7 +1243,7 @@ virDomainBlkioDeviceParseXML(xmlNodePtr root,
}
VIR_FREE(c);
} else if (virXMLNodeNameEqual(node, "read_bytes_sec")) {
- c = (char *)xmlNodeGetContent(node);
+ c = (char *) xmlNodeGetContent(node);
if (virStrToLong_ull(c, NULL, 10, &dev->rbps) < 0) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("could not parse read bytes sec %s"),
@@ -1252,7 +1252,7 @@ virDomainBlkioDeviceParseXML(xmlNodePtr root,
}
VIR_FREE(c);
} else if (virXMLNodeNameEqual(node, "write_bytes_sec")) {
- c = (char *)xmlNodeGetContent(node);
+ c = (char *) xmlNodeGetContent(node);
if (virStrToLong_ull(c, NULL, 10, &dev->wbps) < 0) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("could not parse write bytes sec %s"),
@@ -1261,7 +1261,7 @@ virDomainBlkioDeviceParseXML(xmlNodePtr root,
}
VIR_FREE(c);
} else if (virXMLNodeNameEqual(node, "read_iops_sec")) {
- c = (char *)xmlNodeGetContent(node);
+ c = (char *) xmlNodeGetContent(node);
if (virStrToLong_ui(c, NULL, 10, &dev->riops) < 0) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("could not parse read iops sec %s"),
@@ -1270,7 +1270,7 @@ virDomainBlkioDeviceParseXML(xmlNodePtr root,
}
VIR_FREE(c);
} else if (virXMLNodeNameEqual(node, "write_iops_sec")) {
- c = (char *)xmlNodeGetContent(node);
+ c = (char *) xmlNodeGetContent(node);
if (virStrToLong_ui(c, NULL, 10, &dev->wiops) < 0) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("could not parse write iops sec %s"),
@@ -2296,7 +2296,7 @@ virDomainChrSourceDefIsEqual(const virDomainChrSourceDef *src,
if (tgt->type != src->type)
return false;
- switch ((virDomainChrType)src->type) {
+ switch ((virDomainChrType) src->type) {
case VIR_DOMAIN_CHR_TYPE_FILE:
return src->data.file.append == tgt->data.file.append &&
STREQ_NULLABLE(src->data.file.path, tgt->data.file.path);
@@ -8378,10 +8378,10 @@ virDomainLeaseDefParseXML(xmlNodePtr node)
while (cur != NULL) {
if (cur->type == XML_ELEMENT_NODE) {
if (!key && virXMLNodeNameEqual(cur, "key")) {
- key = (char *)xmlNodeGetContent(cur);
+ key = (char *) xmlNodeGetContent(cur);
} else if (!lockspace &&
virXMLNodeNameEqual(cur, "lockspace")) {
- lockspace = (char *)xmlNodeGetContent(cur);
+ lockspace = (char *) xmlNodeGetContent(cur);
} else if (!path &&
virXMLNodeNameEqual(cur, "target")) {
path = virXMLPropString(cur, "path");
@@ -8620,7 +8620,7 @@ virDomainStorageSourceParse(xmlNodePtr node,
ctxt->node = node;
- switch ((virStorageType)src->type) {
+ switch ((virStorageType) src->type) {
case VIR_STORAGE_TYPE_FILE:
src->path = virXMLPropString(node, "file");
break;
@@ -9454,16 +9454,16 @@ virDomainDiskDefParseXML(virDomainXMLOptionPtr xmlopt,
goto error;
} else if (!serial &&
virXMLNodeNameEqual(cur, "serial")) {
- serial = (char *)xmlNodeGetContent(cur);
+ serial = (char *) xmlNodeGetContent(cur);
} else if (!wwn &&
virXMLNodeNameEqual(cur, "wwn")) {
- wwn = (char *)xmlNodeGetContent(cur);
+ wwn = (char *) xmlNodeGetContent(cur);
if (!virValidateWWN(wwn))
goto error;
} else if (!vendor &&
virXMLNodeNameEqual(cur, "vendor")) {
- vendor = (char *)xmlNodeGetContent(cur);
+ vendor = (char *) xmlNodeGetContent(cur);
if (strlen(vendor) > VENDOR_LEN) {
virReportError(VIR_ERR_XML_ERROR, "%s",
@@ -9478,7 +9478,7 @@ virDomainDiskDefParseXML(virDomainXMLOptionPtr xmlopt,
}
} else if (!product &&
virXMLNodeNameEqual(cur, "product")) {
- product = (char *)xmlNodeGetContent(cur);
+ product = (char *) xmlNodeGetContent(cur);
if (strlen(product) > PRODUCT_LEN) {
virReportError(VIR_ERR_XML_ERROR, "%s",
@@ -9535,11 +9535,11 @@ virDomainDiskDefParseXML(virDomainXMLOptionPtr xmlopt,
if ((def->device == VIR_DOMAIN_DISK_DEVICE_DISK ||
def->device == VIR_DOMAIN_DISK_DEVICE_LUN) &&
- !STRPREFIX((const char *)target, "hd") &&
- !STRPREFIX((const char *)target, "sd") &&
- !STRPREFIX((const char *)target, "vd") &&
- !STRPREFIX((const char *)target, "xvd") &&
- !STRPREFIX((const char *)target, "ubd")) {
+ !STRPREFIX((const char *) target, "hd") &&
+ !STRPREFIX((const char *) target, "sd") &&
+ !STRPREFIX((const char *) target, "vd") &&
+ !STRPREFIX((const char *) target, "xvd") &&
+ !STRPREFIX((const char *) target, "ubd")) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Invalid harddisk device name: %s"), target);
goto error;
@@ -10858,7 +10858,7 @@ virDomainNetDefParseXML(virDomainXMLOptionPtr xmlopt,
type = virXMLPropString(node, "type");
if (type != NULL) {
- if ((int)(def->type = virDomainNetTypeFromString(type)) < 0) {
+ if ((int) (def->type = virDomainNetTypeFromString(type)) < 0) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown interface type '%s'"), type);
goto error;
@@ -11063,16 +11063,16 @@ virDomainNetDefParseXML(virDomainXMLOptionPtr xmlopt,
}
if (macaddr) {
- if (virMacAddrParse((const char *)macaddr, &def->mac) < 0) {
+ if (virMacAddrParse((const char *) macaddr, &def->mac) < 0) {
virReportError(VIR_ERR_XML_ERROR,
_("unable to parse mac address '%s'"),
- (const char *)macaddr);
+ (const char *) macaddr);
goto error;
}
if (virMacAddrIsMulticast(&def->mac)) {
virReportError(VIR_ERR_XML_ERROR,
_("expected unicast mac address, found multicast
'%s'"),
- (const char *)macaddr);
+ (const char *) macaddr);
goto error;
}
} else {
@@ -12459,7 +12459,7 @@ virDomainSmartcardDefParseXML(virDomainXMLOptionPtr xmlopt,
"exactly three certificates"));
goto error;
}
- def->data.cert.file[i] = (char *)xmlNodeGetContent(cur);
+ def->data.cert.file[i] = (char *) xmlNodeGetContent(cur);
if (!def->data.cert.file[i]) {
virReportOOMError();
goto error;
@@ -12468,7 +12468,7 @@ virDomainSmartcardDefParseXML(virDomainXMLOptionPtr xmlopt,
} else if (cur->type == XML_ELEMENT_NODE &&
virXMLNodeNameEqual(cur, "database") &&
!def->data.cert.database) {
- def->data.cert.database = (char *)xmlNodeGetContent(cur);
+ def->data.cert.database = (char *) xmlNodeGetContent(cur);
if (!def->data.cert.database) {
virReportOOMError();
goto error;
@@ -12579,7 +12579,7 @@ virDomainTPMDefParseXML(virDomainXMLOptionPtr xmlopt,
model = virXMLPropString(node, "model");
if (model != NULL &&
- (int)(def->model = virDomainTPMModelTypeFromString(model)) < 0) {
+ (int) (def->model = virDomainTPMModelTypeFromString(model)) < 0) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("Unknown TPM frontend model '%s'"), model);
goto error;
@@ -12610,7 +12610,7 @@ virDomainTPMDefParseXML(virDomainXMLOptionPtr xmlopt,
goto error;
}
- if ((int)(def->type = virDomainTPMBackendTypeFromString(backend)) < 0) {
+ if ((int) (def->type = virDomainTPMBackendTypeFromString(backend)) < 0) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("Unknown TPM backend type '%s'"),
backend);
@@ -17933,7 +17933,7 @@ virDomainDefMaybeAddHostdevSCSIcontroller(virDomainDefPtr def)
for (i = 0; i < def->nhostdevs; i++) {
hostdev = def->hostdevs[i];
if (virHostdevIsSCSIDevice(hostdev) &&
- (int)hostdev->info->addr.drive.controller > maxController) {
+ (int) hostdev->info->addr.drive.controller > maxController) {
virDomainControllerDefPtr cont;
maxController = hostdev->info->addr.drive.controller;
@@ -18682,7 +18682,7 @@ virDomainDefParseXML(xmlDocPtr xml,
if (!(flags & VIR_DOMAIN_DEF_PARSE_INACTIVE))
if (virXPathLong("string(./@id)", ctxt, &id) < 0)
id = -1;
- def->id = (int)id;
+ def->id = (int) id;
/* Find out what type of virtualization to use */
if (!(tmp = virXMLPropString(ctxt->node, "type"))) {
@@ -19257,7 +19257,7 @@ virDomainDefParseXML(xmlDocPtr xml,
goto error;
for (i = 0; i < n; i++) {
- int val = virDomainFeatureTypeFromString((const char *)nodes[i]->name);
+ int val = virDomainFeatureTypeFromString((const char *) nodes[i]->name);
if (val < 0) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unexpected feature '%s'"),
nodes[i]->name);
@@ -19379,7 +19379,7 @@ virDomainDefParseXML(xmlDocPtr xml,
goto error;
for (i = 0; i < n; i++) {
- feature = virDomainHypervTypeFromString((const char *)nodes[i]->name);
+ feature = virDomainHypervTypeFromString((const char *) nodes[i]->name);
if (feature < 0) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unsupported HyperV Enlightenment feature:
%s"),
@@ -19480,7 +19480,7 @@ virDomainDefParseXML(xmlDocPtr xml,
goto error;
for (i = 0; i < n; i++) {
- feature = virDomainKVMTypeFromString((const char *)nodes[i]->name);
+ feature = virDomainKVMTypeFromString((const char *) nodes[i]->name);
if (feature < 0) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unsupported KVM feature: %s"),
@@ -19522,7 +19522,7 @@ virDomainDefParseXML(xmlDocPtr xml,
goto error;
for (i = 0; i < n; i++) {
- int val = virDomainCapsFeatureTypeFromString((const char *)nodes[i]->name);
+ int val = virDomainCapsFeatureTypeFromString((const char *) nodes[i]->name);
if (val < 0) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unexpected capability feature '%s'"),
nodes[i]->name);
@@ -22364,7 +22364,7 @@ virDomainDefAddDiskControllersForType(virDomainDefPtr def,
if (def->disks[i]->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_DRIVE)
continue;
- if ((int)def->disks[i]->info.addr.drive.controller > maxController)
+ if ((int) def->disks[i]->info.addr.drive.controller > maxController)
maxController = def->disks[i]->info.addr.drive.controller;
}
@@ -22871,7 +22871,7 @@ virDomainStorageSourceFormat(virBufferPtr attrBuf,
unsigned int flags,
bool skipSeclabels)
{
- switch ((virStorageType)src->type) {
+ switch ((virStorageType) src->type) {
case VIR_STORAGE_TYPE_FILE:
virBufferEscapeString(attrBuf, " file='%s'", src->path);
break;
@@ -24426,7 +24426,7 @@ virDomainChrSourceDefFormat(virBufferPtr buf,
virBufferSetChildIndent(&childBuf, buf);
- switch ((virDomainChrType)def->type) {
+ switch ((virDomainChrType) def->type) {
case VIR_DOMAIN_CHR_TYPE_NULL:
case VIR_DOMAIN_CHR_TYPE_VC:
case VIR_DOMAIN_CHR_TYPE_STDIO:
@@ -27344,7 +27344,7 @@ virDomainObjFormat(virDomainXMLOptionPtr xmlopt,
virBufferAsprintf(&buf, "<domstatus state='%s'
reason='%s' pid='%lld'>\n",
virDomainStateTypeToString(state),
virDomainStateReasonToString(state, reason),
- (long long)obj->pid);
+ (long long) obj->pid);
virBufferAdjustIndent(&buf, 2);
for (i = 0; i < VIR_DOMAIN_TAINT_LAST; i++) {
@@ -28605,7 +28605,7 @@ virDomainDefSetMetadata(virDomainDefPtr def,
/* create the root node if needed */
if (!def->metadata &&
- !(def->metadata = xmlNewNode(NULL, (unsigned char
*)"metadata"))) {
+ !(def->metadata = xmlNewNode(NULL, (unsigned char *)
"metadata"))) {
virReportOOMError();
goto cleanup;
}
diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c
index 54109a3d2ef8..d520e27e6642 100644
--- a/src/conf/network_conf.c
+++ b/src/conf/network_conf.c
@@ -423,7 +423,7 @@ virNetworkDHCPHostDefParseXML(const char *networkName,
virReportError(VIR_ERR_XML_ERROR,
_("expected unicast mac address, found "
"multicast '%s' in network
'%s'"),
- (const char *)mac, networkName);
+ (const char *) mac, networkName);
goto cleanup;
}
}
diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c
index fd8f4e4a94bd..a55e53b0db7d 100644
--- a/src/conf/node_device_conf.c
+++ b/src/conf/node_device_conf.c
@@ -1959,7 +1959,7 @@ virNodeDeviceDefParseXML(xmlXPathContextPtr ctxt,
}
VIR_FREE(tmp);
- switch ((virNodeDevDevnodeType)val) {
+ switch ((virNodeDevDevnodeType) val) {
case VIR_NODE_DEV_DEVNODE_DEV:
def->devnode = (char*)xmlNodeGetContent(node);
break;
diff --git a/src/conf/nwfilter_conf.c b/src/conf/nwfilter_conf.c
index fd42d58c2cd8..57944de361d6 100644
--- a/src/conf/nwfilter_conf.c
+++ b/src/conf/nwfilter_conf.c
@@ -1817,7 +1817,7 @@ virNWFilterRuleDetailsParse(xmlNodePtr node,
prop = virXMLPropString(node, att[idx].name);
VIR_WARNINGS_NO_CAST_ALIGN
- item = (nwItemDesc *)((char *)nwf + att[idx].dataIdx);
+ item = (nwItemDesc *) ((char *) nwf + att[idx].dataIdx);
VIR_WARNINGS_RESET
flags = &item->flags;
flags_set = match_flag;
@@ -2740,7 +2740,7 @@ virNWFilterDefParseNode(xmlDocPtr xml,
xmlXPathContextPtr ctxt = NULL;
virNWFilterDefPtr def = NULL;
- if (STRNEQ((const char *)root->name, "filter")) {
+ if (STRNEQ((const char *) root->name, "filter")) {
virReportError(VIR_ERR_XML_ERROR,
"%s",
_("unknown root element for nw filter"));
@@ -2990,7 +2990,7 @@ virNWFilterRuleDefDetailsFormat(virBufferPtr buf,
while (att[i].name) {
VIR_WARNINGS_NO_CAST_ALIGN
- item = (nwItemDesc *)((char *)def + att[i].dataIdx);
+ item = (nwItemDesc *) ((char *) def + att[i].dataIdx);
VIR_WARNINGS_RESET
virNWFilterEntryItemFlags flags = item->flags;
if ((flags & NWFILTER_ENTRY_ITEM_FLAG_EXISTS)) {
diff --git a/src/conf/nwfilter_params.c b/src/conf/nwfilter_params.c
index 3a010491826a..04e4965bc79b 100644
--- a/src/conf/nwfilter_params.c
+++ b/src/conf/nwfilter_params.c
@@ -712,7 +712,7 @@ struct addToTableStruct {
static int
addToTable(void *payload, const void *name, void *data)
{
- struct addToTableStruct *atts = (struct addToTableStruct *)data;
+ struct addToTableStruct *atts = (struct addToTableStruct *) data;
virNWFilterVarValuePtr val;
if (atts->errOccurred)
@@ -724,10 +724,10 @@ addToTable(void *payload, const void *name, void *data)
return 0;
}
- if (virNWFilterHashTablePut(atts->target, (const char *)name, val) < 0) {
+ if (virNWFilterHashTablePut(atts->target, (const char *) name, val) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Could not put variable '%s' into hashmap"),
- (const char *)name);
+ (const char *) name);
atts->errOccurred = 1;
virNWFilterVarValueFree(val);
}
@@ -896,7 +896,7 @@ virNWFilterFormatParamAttributes(virBufferPtr buf,
for (j = 0; j < card; j++)
virBufferAsprintf(buf,
"<parameter name='%s'
value='%s'/>\n",
- (const char *)items[i].key,
+ (const char *) items[i].key,
virNWFilterVarValueGetNthValue(value, j));
}
diff --git a/src/conf/snapshot_conf.c b/src/conf/snapshot_conf.c
index 787c3d0feb54..d6198b002c95 100644
--- a/src/conf/snapshot_conf.c
+++ b/src/conf/snapshot_conf.c
@@ -231,7 +231,7 @@ virDomainSnapshotDefParse(xmlXPathContextPtr ctxt,
_("a redefined snapshot must have a name"));
goto cleanup;
}
- if (virAsprintf(&def->name, "%lld", (long long)tv.tv_sec) <
0)
+ if (virAsprintf(&def->name, "%lld", (long long) tv.tv_sec) <
0)
goto cleanup;
}
diff --git a/src/conf/virnetworkobj.c b/src/conf/virnetworkobj.c
index e00c8a7f6c7f..c09c75e258f6 100644
--- a/src/conf/virnetworkobj.c
+++ b/src/conf/virnetworkobj.c
@@ -394,7 +394,7 @@ virNetworkObjSearchName(const void *payload,
int want = 0;
virObjectLock(obj);
- if (STREQ(obj->def->name, (const char *)data))
+ if (STREQ(obj->def->name, (const char *) data))
want = 1;
virObjectUnlock(obj);
return want;
diff --git a/src/conf/virsecretobj.c b/src/conf/virsecretobj.c
index 48ce3c814178..384d2240e7aa 100644
--- a/src/conf/virsecretobj.c
+++ b/src/conf/virsecretobj.c
@@ -664,7 +664,7 @@ virSecretObjDeleteData(virSecretObjPtr obj)
{
/* The configFile will already be removed, so secret won't be
* loaded again if this fails */
- (void)unlink(obj->base64File);
+ (void) unlink(obj->base64File);
}
@@ -853,7 +853,7 @@ virSecretLoadValue(virSecretObjPtr obj)
goto cleanup;
}
- if ((size_t)st.st_size != st.st_size) {
+ if ((size_t) st.st_size != st.st_size) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("'%s' file does not fit in memory"),
obj->base64File);
@@ -880,7 +880,7 @@ virSecretLoadValue(virSecretObjPtr obj)
if (value == NULL)
goto cleanup;
- obj->value = (unsigned char *)value;
+ obj->value = (unsigned char *) value;
value = NULL;
obj->value_size = value_size;
diff --git a/src/conf/virstorageobj.c b/src/conf/virstorageobj.c
index 6c937f105ca9..4ae5e46be34e 100644
--- a/src/conf/virstorageobj.c
+++ b/src/conf/virstorageobj.c
@@ -466,7 +466,7 @@ virStoragePoolObjListSearchCb(const void *payload,
{
virStoragePoolObjPtr obj = (virStoragePoolObjPtr) payload;
struct _virStoragePoolObjListSearchData *data =
- (struct _virStoragePoolObjListSearchData *)opaque;
+ (struct _virStoragePoolObjListSearchData *) opaque;
virObjectLock(obj);
if (data->searcher(obj, data->opaque))
@@ -1818,7 +1818,7 @@ virStoragePoolObjSourceFindDuplicateCb(const void *payload,
if (STREQ(obj->def->name, data->def->name))
return 0;
- switch ((virStoragePoolType)obj->def->type) {
+ switch ((virStoragePoolType) obj->def->type) {
case VIR_STORAGE_POOL_DIR:
case VIR_STORAGE_POOL_GLUSTER:
case VIR_STORAGE_POOL_NETFS:
--
2.17.0