diff --git a/src/conf/checkpoint_conf.c b/src/conf/checkpoint_conf.c
index e7b204a4d2..b254dce7fd 100644
--- a/src/conf/checkpoint_conf.c
+++ b/src/conf/checkpoint_conf.c
@@ -197,7 +197,7 @@ virDomainCheckpointDefParse(xmlXPathContextPtr ctxt,
return NULL;
}
- VIR_STEAL_PTR(ret, def);
+ ret = g_steal_pointer(&def);
return ret;
}
diff --git a/src/conf/cpu_conf.c b/src/conf/cpu_conf.c
index a6bb9ea263..80b7687b86 100644
--- a/src/conf/cpu_conf.c
+++ b/src/conf/cpu_conf.c
@@ -185,14 +185,14 @@ virCPUDefStealModel(virCPUDefPtr dst,
char *vendor_id = NULL;
if (keepVendor) {
- VIR_STEAL_PTR(vendor, dst->vendor);
- VIR_STEAL_PTR(vendor_id, dst->vendor_id);
+ vendor = g_steal_pointer(&dst->vendor);
+ vendor_id = g_steal_pointer(&dst->vendor_id);
}
virCPUDefFreeModel(dst);
- VIR_STEAL_PTR(dst->model, src->model);
- VIR_STEAL_PTR(dst->features, src->features);
+ dst->model = g_steal_pointer(&src->model);
+ dst->features = g_steal_pointer(&src->features);
dst->microcodeVersion = src->microcodeVersion;
dst->nfeatures_max = src->nfeatures_max;
src->nfeatures_max = 0;
@@ -203,8 +203,8 @@ virCPUDefStealModel(virCPUDefPtr dst,
dst->vendor = vendor;
dst->vendor_id = vendor_id;
} else {
- VIR_STEAL_PTR(dst->vendor, src->vendor);
- VIR_STEAL_PTR(dst->vendor_id, src->vendor_id);
+ dst->vendor = g_steal_pointer(&src->vendor);
+ dst->vendor_id = g_steal_pointer(&src->vendor_id);
}
}
@@ -465,7 +465,7 @@ virCPUDefParseXML(xmlXPathContextPtr ctxt,
tsc->scaling = scaling;
}
- VIR_STEAL_PTR(def->tsc, tsc);
+ def->tsc = g_steal_pointer(&tsc);
}
}
@@ -644,7 +644,7 @@ virCPUDefParseXML(xmlXPathContextPtr ctxt,
def->cache->mode = mode;
}
- VIR_STEAL_PTR(*cpu, def);
+ *cpu = g_steal_pointer(&def);
ret = 0;
cleanup:
@@ -987,7 +987,7 @@ virCPUDefCheckFeatures(virCPUDefPtr cpu,
}
}
- VIR_STEAL_PTR(*features, list);
+ *features = g_steal_pointer(&list);
return n;
}
diff --git a/src/conf/domain_addr.c b/src/conf/domain_addr.c
index fc612ee6a2..d0026942aa 100644
--- a/src/conf/domain_addr.c
+++ b/src/conf/domain_addr.c
@@ -1757,7 +1757,7 @@ virDomainVirtioSerialAddrSetCreateFromDomain(virDomainDefPtr def)
addrs) < 0)
goto cleanup;
- VIR_STEAL_PTR(ret, addrs);
+ ret = g_steal_pointer(&addrs);
cleanup:
virDomainVirtioSerialAddrSetFree(addrs);
return ret;
@@ -2094,7 +2094,7 @@ virDomainUSBAddressHubNew(size_t nports)
goto cleanup;
hub->nports = nports;
- VIR_STEAL_PTR(ret, hub);
+ ret = g_steal_pointer(&hub);
cleanup:
virDomainUSBAddressHubFree(hub);
return ret;
diff --git a/src/conf/domain_capabilities.c b/src/conf/domain_capabilities.c
index b0fdd15d6c..43a778a505 100644
--- a/src/conf/domain_capabilities.c
+++ b/src/conf/domain_capabilities.c
@@ -229,10 +229,10 @@ virDomainCapsCPUModelsAddSteal(virDomainCapsCPUModelsPtr cpuModels,
return -1;
cpuModels->models[cpuModels->nmodels].usable = usable;
- VIR_STEAL_PTR(cpuModels->models[cpuModels->nmodels].name, *name);
+ cpuModels->models[cpuModels->nmodels].name = g_steal_pointer(&*name);
if (blockers)
- VIR_STEAL_PTR(cpuModels->models[cpuModels->nmodels].blockers, *blockers);
+ cpuModels->models[cpuModels->nmodels].blockers = g_steal_pointer(&*blockers);
cpuModels->nmodels++;
return 0;
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 8b56ff3458..69464a3345 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -1379,7 +1379,7 @@ virDomainKeyWrapDefParseXML(virDomainDefPtr def, xmlXPathContextPtr ctxt)
}
if (keywrap->aes || keywrap->dea)
- VIR_STEAL_PTR(def->keywrap, keywrap);
+ def->keywrap = g_steal_pointer(&keywrap);
return 0;
}
@@ -1794,7 +1794,7 @@ virDomainVcpuDefNew(virDomainXMLOptionPtr xmlopt)
if (VIR_ALLOC(ret) < 0)
return NULL;
- VIR_STEAL_PTR(ret->privateData, priv);
+ ret->privateData = g_steal_pointer(&priv);
return ret;
}
@@ -2362,7 +2362,7 @@ virDomainVsockDefNew(virDomainXMLOptionPtr xmlopt)
!(vsock->privateData = xmlopt->privateData.vsockNew()))
goto cleanup;
- VIR_STEAL_PTR(ret, vsock);
+ ret = g_steal_pointer(&vsock);
cleanup:
virDomainVsockDefFree(vsock);
return ret;
@@ -4938,7 +4938,7 @@ virDomainPostParseCheckISCSIPath(char **srcpath)
if (virAsprintf(&path, "%s/0", *srcpath) < 0)
return -1;
VIR_FREE(*srcpath);
- VIR_STEAL_PTR(*srcpath, path);
+ *srcpath = g_steal_pointer(&path);
return 0;
}
@@ -5660,10 +5660,10 @@ virDomainDefPostParseVideo(virDomainDefPtr def,
/* we don't want to format any values we automatically fill in for
* videos into the XML, so clear them, but retain any user-assigned
* alias */
- VIR_STEAL_PTR(alias, def->videos[0]->info.alias);
+ alias = g_steal_pointer(&def->videos[0]->info.alias);
virDomainVideoDefClear(def->videos[0]);
def->videos[0]->type = VIR_DOMAIN_VIDEO_TYPE_NONE;
- VIR_STEAL_PTR(def->videos[0]->info.alias, alias);
+ def->videos[0]->info.alias = g_steal_pointer(&alias);
} else {
virDomainDeviceDef device = {
.type = VIR_DOMAIN_DEVICE_VIDEO,
@@ -6527,7 +6527,7 @@ virDomainDefValidateAliases(const virDomainDef *def,
goto cleanup;
if (aliases)
- VIR_STEAL_PTR(*aliases, data.aliases);
+ *aliases = g_steal_pointer(&data.aliases);
ret = 0;
cleanup:
@@ -7511,7 +7511,7 @@ virDomainDeviceInfoParseXML(virDomainXMLOptionPtr xmlopt G_GNUC_UNUSED,
(xmlopt->config.features & VIR_DOMAIN_DEF_FEATURE_USER_ALIAS &&
virDomainDeviceAliasIsUserAlias(aliasStr) &&
strspn(aliasStr, USER_ALIAS_CHARS) == strlen(aliasStr)))
- VIR_STEAL_PTR(info->alias, aliasStr);
+ info->alias = g_steal_pointer(&aliasStr);
}
if (master) {
@@ -8030,7 +8030,7 @@ virDomainHostdevSubsysSCSIiSCSIDefParseXML(xmlNodePtr sourcenode,
authdef->secrettype);
return -1;
}
- VIR_STEAL_PTR(iscsisrc->src->auth, authdef);
+ iscsisrc->src->auth = g_steal_pointer(&authdef);
}
cur = cur->next;
}
@@ -8096,7 +8096,7 @@ virDomainHostdevSubsysSCSIVHostDefParseXML(xmlNodePtr sourcenode,
virReportError(VIR_ERR_XML_ERROR, "%s", _("malformed 'wwpn' value"));
return -1;
}
- VIR_STEAL_PTR(hostsrc->wwpn, wwpn);
+ hostsrc->wwpn = g_steal_pointer(&wwpn);
break;
case VIR_DOMAIN_HOSTDEV_SUBSYS_SCSI_HOST_PROTOCOL_TYPE_NONE:
case VIR_DOMAIN_HOSTDEV_SUBSYS_SCSI_HOST_PROTOCOL_TYPE_LAST:
@@ -8389,7 +8389,7 @@ virDomainNetIPParseXML(xmlNodePtr node)
return NULL;
}
- VIR_STEAL_PTR(ret, ip);
+ ret = g_steal_pointer(&ip);
return ret;
}
@@ -8803,7 +8803,7 @@ virSecurityLabelDefParseXML(xmlXPathContextPtr ctxt,
goto error;
}
- VIR_STEAL_PTR(seclabel->label, p);
+ seclabel->label = g_steal_pointer(&p);
}
/* Only parse imagelabel, if requested live XML with relabeling */
@@ -8817,14 +8817,14 @@ virSecurityLabelDefParseXML(xmlXPathContextPtr ctxt,
"%s", _("security imagelabel is missing"));
goto error;
}
- VIR_STEAL_PTR(seclabel->imagelabel, p);
+ seclabel->imagelabel = g_steal_pointer(&p);
}
/* Only parse baselabel for dynamic label type */
if (seclabel->type == VIR_DOMAIN_SECLABEL_DYNAMIC) {
p = virXPathStringLimit("string(./baselabel[1])",
VIR_SECURITY_LABEL_BUFLEN-1, ctxt);
- VIR_STEAL_PTR(seclabel->baselabel, p);
+ seclabel->baselabel = g_steal_pointer(&p);
}
return seclabel;
@@ -9105,9 +9105,9 @@ virDomainLeaseDefParseXML(xmlNodePtr node)
goto error;
}
- VIR_STEAL_PTR(def->key, key);
- VIR_STEAL_PTR(def->lockspace, lockspace);
- VIR_STEAL_PTR(def->path, path);
+ def->key = g_steal_pointer(&key);
+ def->lockspace = g_steal_pointer(&lockspace);
+ def->path = g_steal_pointer(&path);
cleanup:
return def;
@@ -9156,7 +9156,7 @@ virDomainDiskSourcePoolDefParse(xmlNodePtr node,
goto cleanup;
}
- VIR_STEAL_PTR(*srcpool, source);
+ *srcpool = g_steal_pointer(&source);
ret = 0;
cleanup:
@@ -9305,7 +9305,7 @@ virDomainStorageSourceParseBase(const char *type,
return NULL;
}
- VIR_STEAL_PTR(ret, src);
+ ret = g_steal_pointer(&src);
return ret;
}
@@ -9442,7 +9442,7 @@ virDomainDiskBackingStoreParse(xmlXPathContextPtr ctxt,
virDomainDiskBackingStoreParse(ctxt, backingStore, flags, xmlopt) < 0)
return -1;
- VIR_STEAL_PTR(src->backingStore, backingStore);
+ src->backingStore = g_steal_pointer(&backingStore);
return 0;
}
@@ -10343,16 +10343,16 @@ virDomainDiskDefParseXML(virDomainXMLOptionPtr xmlopt,
def->startupPolicy = val;
}
- VIR_STEAL_PTR(def->dst, target);
+ def->dst = g_steal_pointer(&target);
if (authdef)
- VIR_STEAL_PTR(def->src->auth, authdef);
+ def->src->auth = g_steal_pointer(&authdef);
if (encryption)
- VIR_STEAL_PTR(def->src->encryption, encryption);
- VIR_STEAL_PTR(def->domain_name, domain_name);
- VIR_STEAL_PTR(def->serial, serial);
- VIR_STEAL_PTR(def->wwn, wwn);
- VIR_STEAL_PTR(def->vendor, vendor);
- VIR_STEAL_PTR(def->product, product);
+ def->src->encryption = g_steal_pointer(&encryption);
+ def->domain_name = g_steal_pointer(&domain_name);
+ def->serial = g_steal_pointer(&serial);
+ def->wwn = g_steal_pointer(&wwn);
+ def->vendor = g_steal_pointer(&vendor);
+ def->product = g_steal_pointer(&product);
if (virDomainDiskBackingStoreParse(ctxt, def->src, flags, xmlopt) < 0)
goto error;
@@ -11179,8 +11179,8 @@ virDomainFSDefParseXML(virDomainXMLOptionPtr xmlopt,
goto error;
}
- VIR_STEAL_PTR(def->src->path, source);
- VIR_STEAL_PTR(def->dst, target);
+ def->src->path = g_steal_pointer(&source);
+ def->dst = g_steal_pointer(&target);
if (virDomainDeviceInfoParseXML(xmlopt, node, &def->info, flags) < 0)
goto error;
@@ -11358,7 +11358,7 @@ virDomainActualNetDefParseXML(xmlNodePtr node,
if (vlanNode && virNetDevVlanParse(vlanNode, ctxt, &actual->vlan) < 0)
goto error;
- VIR_STEAL_PTR(*def, actual);
+ *def = g_steal_pointer(&actual);
ret = 0;
error:
virDomainActualNetDefFree(actual);
@@ -11762,9 +11762,9 @@ virDomainNetDefParseXML(virDomainXMLOptionPtr xmlopt,
goto error;
}
- VIR_STEAL_PTR(def->data.network.name, network);
- VIR_STEAL_PTR(def->data.network.portgroup, portgroup);
- VIR_STEAL_PTR(def->data.network.actual, actual);
+ def->data.network.name = g_steal_pointer(&network);
+ def->data.network.portgroup = g_steal_pointer(&portgroup);
+ def->data.network.actual = g_steal_pointer(&actual);
break;
case VIR_DOMAIN_NET_TYPE_VHOSTUSER:
@@ -11810,7 +11810,7 @@ virDomainNetDefParseXML(virDomainXMLOptionPtr xmlopt,
goto error;
def->data.vhostuser->type = VIR_DOMAIN_CHR_TYPE_UNIX;
- VIR_STEAL_PTR(def->data.vhostuser->data.nix.path, vhostuser_path);
+ def->data.vhostuser->data.nix.path = g_steal_pointer(&vhostuser_path);
if (STREQ(vhostuser_mode, "server")) {
def->data.vhostuser->data.nix.listen = true;
@@ -11839,7 +11839,7 @@ virDomainNetDefParseXML(virDomainXMLOptionPtr xmlopt,
"specified with "));
goto error;
}
- VIR_STEAL_PTR(def->data.bridge.brname, bridge);
+ def->data.bridge.brname = g_steal_pointer(&bridge);
break;
case VIR_DOMAIN_NET_TYPE_CLIENT:
@@ -11869,7 +11869,7 @@ virDomainNetDefParseXML(virDomainXMLOptionPtr xmlopt,
goto error;
}
} else {
- VIR_STEAL_PTR(def->data.socket.address, address);
+ def->data.socket.address = g_steal_pointer(&address);
}
if (def->type != VIR_DOMAIN_NET_TYPE_UDP)
@@ -11894,7 +11894,7 @@ virDomainNetDefParseXML(virDomainXMLOptionPtr xmlopt,
"specified with socket interface"));
goto error;
} else {
- VIR_STEAL_PTR(def->data.socket.localaddr, localaddr);
+ def->data.socket.localaddr = g_steal_pointer(&localaddr);
}
break;
@@ -11905,7 +11905,7 @@ virDomainNetDefParseXML(virDomainXMLOptionPtr xmlopt,
"with "));
goto error;
}
- VIR_STEAL_PTR(def->data.internal.name, internal);
+ def->data.internal.name = g_steal_pointer(&internal);
break;
case VIR_DOMAIN_NET_TYPE_DIRECT:
@@ -11927,7 +11927,7 @@ virDomainNetDefParseXML(virDomainXMLOptionPtr xmlopt,
def->data.direct.mode = VIR_NETDEV_MACVLAN_MODE_VEPA;
}
- VIR_STEAL_PTR(def->data.direct.linkdev, dev);
+ def->data.direct.linkdev = g_steal_pointer(&dev);
if (ifname &&
flags & VIR_DOMAIN_DEF_PARSE_INACTIVE &&
@@ -11990,15 +11990,15 @@ virDomainNetDefParseXML(virDomainXMLOptionPtr xmlopt,
}
if (script != NULL)
- VIR_STEAL_PTR(def->script, script);
+ def->script = g_steal_pointer(&script);
if (domain_name != NULL)
- VIR_STEAL_PTR(def->domain_name, domain_name);
+ def->domain_name = g_steal_pointer(&domain_name);
if (ifname != NULL)
- VIR_STEAL_PTR(def->ifname, ifname);
+ def->ifname = g_steal_pointer(&ifname);
if (ifname_guest != NULL)
- VIR_STEAL_PTR(def->ifname_guest, ifname_guest);
+ def->ifname_guest = g_steal_pointer(&ifname_guest);
if (ifname_guest_actual != NULL)
- VIR_STEAL_PTR(def->ifname_guest_actual, ifname_guest_actual);
+ def->ifname_guest_actual = g_steal_pointer(&ifname_guest_actual);
if (def->type != VIR_DOMAIN_NET_TYPE_HOSTDEV &&
virDomainNetIsVirtioModel(def)) {
@@ -12198,7 +12198,7 @@ virDomainNetDefParseXML(virDomainXMLOptionPtr xmlopt,
def->driver.virtio.guest.ufo = val;
}
}
- VIR_STEAL_PTR(def->backend.vhost, vhost_path);
+ def->backend.vhost = g_steal_pointer(&vhost_path);
}
def->linkstate = VIR_DOMAIN_NET_INTERFACE_LINK_STATE_DEFAULT;
@@ -12216,8 +12216,8 @@ virDomainNetDefParseXML(virDomainXMLOptionPtr xmlopt,
case VIR_DOMAIN_NET_TYPE_ETHERNET:
case VIR_DOMAIN_NET_TYPE_NETWORK:
case VIR_DOMAIN_NET_TYPE_BRIDGE:
- VIR_STEAL_PTR(def->filter, filter);
- VIR_STEAL_PTR(def->filterparams, filterparams);
+ def->filter = g_steal_pointer(&filter);
+ def->filterparams = g_steal_pointer(&filterparams);
break;
case VIR_DOMAIN_NET_TYPE_USER:
case VIR_DOMAIN_NET_TYPE_VHOSTUSER:
@@ -13213,7 +13213,7 @@ virDomainTPMDefParseXML(virDomainXMLOptionPtr xmlopt,
path = virXPathString("string(./backend/device/@path)", ctxt);
if (!path && VIR_STRDUP(path, VIR_DOMAIN_TPM_DEFAULT_DEVICE) < 0)
goto error;
- VIR_STEAL_PTR(def->data.passthrough.source.data.file.path, path);
+ def->data.passthrough.source.data.file.path = g_steal_pointer(&path);
def->data.passthrough.source.type = VIR_DOMAIN_CHR_TYPE_DEV;
break;
case VIR_DOMAIN_TPM_TYPE_EMULATOR:
@@ -13751,7 +13751,7 @@ virDomainGraphicsListenDefParseXML(virDomainGraphicsListenDefPtr def,
}
if (!address)
- VIR_STEAL_PTR(address, addressCompat);
+ address = g_steal_pointer(&addressCompat);
}
if (def->type == VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_SOCKET) {
@@ -13764,14 +13764,14 @@ virDomainGraphicsListenDefParseXML(virDomainGraphicsListenDefPtr def,
}
if (!socketPath)
- VIR_STEAL_PTR(socketPath, socketCompat);
+ socketPath = g_steal_pointer(&socketCompat);
}
if (address && address[0] &&
(def->type == VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_ADDRESS ||
(def->type == VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_NETWORK &&
!(flags & VIR_DOMAIN_DEF_PARSE_INACTIVE)))) {
- VIR_STEAL_PTR(def->address, address);
+ def->address = g_steal_pointer(&address);
}
if (network && network[0]) {
@@ -13781,7 +13781,7 @@ virDomainGraphicsListenDefParseXML(virDomainGraphicsListenDefPtr def,
"type 'network'"));
goto error;
}
- VIR_STEAL_PTR(def->network, network);
+ def->network = g_steal_pointer(&network);
}
if (socketPath && socketPath[0]) {
@@ -13791,7 +13791,7 @@ virDomainGraphicsListenDefParseXML(virDomainGraphicsListenDefPtr def,
"type 'socket'"));
goto error;
}
- VIR_STEAL_PTR(def->socket, socketPath);
+ def->socket = g_steal_pointer(&socketPath);
}
if (fromConfig &&
@@ -13870,7 +13870,7 @@ virDomainGraphicsListensParseXML(virDomainGraphicsDefPtr def,
if (socketPath) {
newListen.type = VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_SOCKET;
- VIR_STEAL_PTR(newListen.socket, socketPath);
+ newListen.socket = g_steal_pointer(&socketPath);
} else {
newListen.type = VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_ADDRESS;
newListen.address = virXMLPropString(node, "listen");
@@ -14348,7 +14348,7 @@ virDomainGraphicsDefParseXMLSpice(virDomainGraphicsDefPtr def,
}
def->data.spice.gl = enableVal;
- VIR_STEAL_PTR(def->data.spice.rendernode, rendernode);
+ def->data.spice.rendernode = g_steal_pointer(&rendernode);
} else if (virXMLNodeNameEqual(cur, "mouse")) {
int modeVal;
@@ -14921,7 +14921,7 @@ virDomainShmemDefParseXML(virDomainXMLOptionPtr xmlopt,
goto cleanup;
- VIR_STEAL_PTR(ret, def);
+ ret = g_steal_pointer(&def);
cleanup:
virDomainShmemDefFree(def);
return ret;
@@ -14981,7 +14981,7 @@ virSysinfoBIOSParseXML(xmlNodePtr node,
def = NULL;
}
- VIR_STEAL_PTR(*bios, def);
+ *bios = g_steal_pointer(&def);
ret = 0;
cleanup:
virSysinfoBIOSDefFree(def);
@@ -15057,7 +15057,7 @@ virSysinfoSystemParseXML(xmlNodePtr node,
def = NULL;
}
- VIR_STEAL_PTR(*sysdef, def);
+ *sysdef = g_steal_pointer(&def);
ret = 0;
cleanup:
virSysinfoSystemDefFree(def);
@@ -15108,7 +15108,7 @@ virSysinfoBaseBoardParseXML(xmlXPathContextPtr ctxt,
}
}
- VIR_STEAL_PTR(*baseBoard, boards);
+ *baseBoard = g_steal_pointer(&boards);
*nbaseBoard = nboards;
ret = 0;
cleanup:
@@ -15146,7 +15146,7 @@ virSysinfoOEMStringsParseXML(xmlNodePtr node,
for (i = 0; i < nstrings; i++)
def->values[i] = virXMLNodeContentString(strings[i]);
- VIR_STEAL_PTR(*oem, def);
+ *oem = g_steal_pointer(&def);
ret = 0;
cleanup:
virSysinfoOEMStringsDefFree(def);
@@ -15191,7 +15191,7 @@ virSysinfoChassisParseXML(xmlNodePtr node,
def = NULL;
}
- VIR_STEAL_PTR(*chassisdef, def);
+ *chassisdef = g_steal_pointer(&def);
ret = 0;
cleanup:
virSysinfoChassisDefFree(def);
@@ -16315,7 +16315,7 @@ virDomainIOMMUDefParseXML(xmlNodePtr node,
}
}
- VIR_STEAL_PTR(ret, iommu);
+ ret = g_steal_pointer(&iommu);
cleanup:
return ret;
@@ -16378,7 +16378,7 @@ virDomainVsockDefParseXML(virDomainXMLOptionPtr xmlopt,
if (virDomainDeviceInfoParseXML(xmlopt, node, &vsock->info, flags) < 0)
goto cleanup;
- VIR_STEAL_PTR(ret, vsock);
+ ret = g_steal_pointer(&vsock);
cleanup:
return ret;
@@ -18372,7 +18372,7 @@ virDomainIOThreadPinDefParseXML(xmlNodePtr node,
return -1;
}
- VIR_STEAL_PTR(iothrid->cpumask, cpumask);
+ iothrid->cpumask = g_steal_pointer(&cpumask);
return 0;
}
@@ -18403,7 +18403,7 @@ virDomainEmulatorPinDefParseXML(xmlNodePtr node)
return NULL;
}
- VIR_STEAL_PTR(ret, def);
+ ret = g_steal_pointer(&def);
return ret;
}
@@ -18738,7 +18738,7 @@ virDomainEmulatorSchedParse(xmlNodePtr node,
&sched->priority) < 0)
return -1;
- VIR_STEAL_PTR(def->cputune.emulatorsched, sched);
+ def->cputune.emulatorsched = g_steal_pointer(&sched);
return 0;
}
@@ -19506,7 +19506,7 @@ virDomainResctrlNew(xmlNodePtr node,
resctrl->alloc = virObjectRef(alloc);
- VIR_STEAL_PTR(ret, resctrl);
+ ret = g_steal_pointer(&resctrl);
cleanup:
virDomainResctrlDefFree(resctrl);
return ret;
@@ -30529,7 +30529,7 @@ virDomainDiskSetBlockIOTune(virDomainDiskDefPtr disk,
VIR_FREE(disk->blkdeviotune.group_name);
disk->blkdeviotune = *info;
- VIR_STEAL_PTR(disk->blkdeviotune.group_name, tmp_group);
+ disk->blkdeviotune.group_name = g_steal_pointer(&tmp_group);
return 0;
}
diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c
index d33f6736ab..5b4bb34a5a 100644
--- a/src/conf/node_device_conf.c
+++ b/src/conf/node_device_conf.c
@@ -2354,7 +2354,7 @@ virNodeDeviceCapsListExport(virNodeDeviceDefPtr def,
#undef MAYBE_ADD_CAP
if (want_list)
- VIR_STEAL_PTR(*list, tmp);
+ *list = g_steal_pointer(&tmp);
ret = ncaps;
cleanup:
VIR_FREE(tmp);
@@ -2386,18 +2386,18 @@ virNodeDeviceGetSCSIHostCaps(virNodeDevCapSCSIHostPtr scsi_host)
goto cleanup;
}
VIR_FREE(scsi_host->wwpn);
- VIR_STEAL_PTR(scsi_host->wwpn, tmp);
+ scsi_host->wwpn = g_steal_pointer(&tmp);
if (!(tmp = virVHBAGetConfig(NULL, scsi_host->host, "node_name"))) {
VIR_WARN("Failed to read WWNN for host%d", scsi_host->host);
goto cleanup;
}
VIR_FREE(scsi_host->wwnn);
- VIR_STEAL_PTR(scsi_host->wwnn, tmp);
+ scsi_host->wwnn = g_steal_pointer(&tmp);
if ((tmp = virVHBAGetConfig(NULL, scsi_host->host, "fabric_name"))) {
VIR_FREE(scsi_host->fabric_wwn);
- VIR_STEAL_PTR(scsi_host->fabric_wwn, tmp);
+ scsi_host->fabric_wwn = g_steal_pointer(&tmp);
}
}
@@ -2466,7 +2466,7 @@ virNodeDeviceGetSCSITargetCaps(const char *sysfsPath,
goto cleanup;
VIR_FREE(scsi_target->rport);
- VIR_STEAL_PTR(scsi_target->rport, rport);
+ scsi_target->rport = g_steal_pointer(&rport);
if (virFCReadRportValue(scsi_target->rport, "port_name",
&scsi_target->wwpn) < 0) {
@@ -2591,7 +2591,7 @@ virNodeDeviceGetPCIMdevTypesCaps(const char *sysfspath,
if (rc <= 0)
return rc;
- VIR_STEAL_PTR(pci_dev->mdev_types, types);
+ pci_dev->mdev_types = g_steal_pointer(&types);
pci_dev->nmdev_types = rc;
pci_dev->flags |= VIR_NODE_DEV_CAP_FLAG_PCI_MDEV;
diff --git a/src/conf/snapshot_conf.c b/src/conf/snapshot_conf.c
index 9628a8df62..0e9d307321 100644
--- a/src/conf/snapshot_conf.c
+++ b/src/conf/snapshot_conf.c
@@ -362,7 +362,7 @@ virDomainSnapshotDefParse(xmlXPathContextPtr ctxt,
"disk-only snapshot"));
goto cleanup;
}
- VIR_STEAL_PTR(def->file, memoryFile);
+ def->file = g_steal_pointer(&memoryFile);
/* verify that memory path is absolute */
if (def->file && def->file[0] != '/') {
@@ -407,7 +407,7 @@ virDomainSnapshotDefParse(xmlXPathContextPtr ctxt,
if (!offline && virSaveCookieParse(ctxt, &def->cookie, saveCookie) < 0)
goto cleanup;
- VIR_STEAL_PTR(ret, def);
+ ret = g_steal_pointer(&def);
cleanup:
VIR_FREE(creation);
@@ -543,7 +543,7 @@ virDomainSnapshotRedefineValidate(virDomainSnapshotDefPtr def,
return -1;
} else {
/* Transfer the domain def */
- VIR_STEAL_PTR(def->parent.dom, otherdef->parent.dom);
+ def->parent.dom = g_steal_pointer(&otherdef->parent.dom);
}
}
}
@@ -1008,7 +1008,7 @@ virDomainSnapshotRedefinePrep(virDomainObjPtr vm,
flags) < 0) {
/* revert any stealing of the snapshot domain definition */
if (check_if_stolen && def->parent.dom && !otherdef->parent.dom)
- VIR_STEAL_PTR(otherdef->parent.dom, def->parent.dom);
+ otherdef->parent.dom = g_steal_pointer(&def->parent.dom);
return -1;
}
if (other) {
diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c
index bddede0934..9e4978b560 100644
--- a/src/conf/storage_conf.c
+++ b/src/conf/storage_conf.c
@@ -659,7 +659,7 @@ virStoragePoolDefParseSource(xmlXPathContextPtr ctxt,
goto cleanup;
}
- VIR_STEAL_PTR(source->auth, authdef);
+ source->auth = g_steal_pointer(&authdef);
}
/* Option protocol version string (NFSvN) */
@@ -822,7 +822,7 @@ virStoragePoolDefRefreshParse(xmlXPathContextPtr ctxt,
return -1;
refresh->volume.allocation = tmp;
- VIR_STEAL_PTR(def->refresh, refresh);
+ def->refresh = g_steal_pointer(&refresh);
return 0;
}
@@ -998,7 +998,7 @@ virStoragePoolDefParseXML(xmlXPathContextPtr ctxt)
return NULL;
}
- VIR_STEAL_PTR(ret, def);
+ ret = g_steal_pointer(&def);
return ret;
}
@@ -1433,7 +1433,7 @@ virStorageVolDefParseXML(virStoragePoolDefPtr pool,
VIR_FREE(nodes);
}
- VIR_STEAL_PTR(ret, def);
+ ret = g_steal_pointer(&def);
return ret;
}
diff --git a/src/conf/virnetworkobj.c b/src/conf/virnetworkobj.c
index 560839ea7d..435f3611e9 100644
--- a/src/conf/virnetworkobj.c
+++ b/src/conf/virnetworkobj.c
@@ -620,7 +620,7 @@ virNetworkObjAssignDefLocked(virNetworkObjListPtr nets,
obj->persistent = !(flags & VIR_NETWORK_OBJ_LIST_ADD_LIVE);
}
- VIR_STEAL_PTR(ret, obj);
+ ret = g_steal_pointer(&obj);
cleanup:
virNetworkObjEndAPI(&obj);
diff --git a/src/conf/virnwfilterbindingobj.c b/src/conf/virnwfilterbindingobj.c
index 06dd66a5d1..48d53fafb1 100644
--- a/src/conf/virnwfilterbindingobj.c
+++ b/src/conf/virnwfilterbindingobj.c
@@ -93,7 +93,7 @@ virNWFilterBindingObjStealDef(virNWFilterBindingObjPtr obj)
{
virNWFilterBindingDefPtr def;
- VIR_STEAL_PTR(def, obj->def);
+ def = g_steal_pointer(&obj->def);
return def;
}
diff --git a/src/conf/virsecretobj.c b/src/conf/virsecretobj.c
index f9f222dcd3..ebf6ca7680 100644
--- a/src/conf/virsecretobj.c
+++ b/src/conf/virsecretobj.c
@@ -393,7 +393,7 @@ virSecretObjListAdd(virSecretObjListPtr secrets,
virObjectRef(obj);
}
- VIR_STEAL_PTR(ret, obj);
+ ret = g_steal_pointer(&obj);
cleanup:
virSecretObjEndAPI(&obj);
diff --git a/src/conf/virstorageobj.c b/src/conf/virstorageobj.c
index b9717b2fa2..e5ef9c8a68 100644
--- a/src/conf/virstorageobj.c
+++ b/src/conf/virstorageobj.c
@@ -1115,7 +1115,7 @@ virStoragePoolObjIsDuplicate(virStoragePoolObjListPtr pools,
}
}
- VIR_STEAL_PTR(*objRet, obj);
+ *objRet = g_steal_pointer(&obj);
ret = 1;
} else {
/* UUID does not match, but if a name matches, refuse it */
@@ -1540,7 +1540,7 @@ virStoragePoolObjAssignDef(virStoragePoolObjPtr obj,
} else {
if (!obj->newDef &&
flags & VIR_STORAGE_POOL_OBJ_LIST_ADD_LIVE)
- VIR_STEAL_PTR(obj->newDef, obj->def);
+ obj->newDef = g_steal_pointer(&obj->def);
virStoragePoolDefFree(obj->def);
obj->def = def;