VIR_WARN("Expecting a symlink at %s for controller %s",
linkSrc, typeStr);
} else {
- VIR_STEAL_PTR(controller->linkPoint, linkSrc);
+ controller->linkPoint = g_steal_pointer(&linkSrc);
}
}
{
char *ret = NULL;
- VIR_STEAL_PTR(ret, group->legacy[VIR_CGROUP_CONTROLLER_SYSTEMD].placement);
+ ret = g_steal_pointer(&group->legacy[VIR_CGROUP_CONTROLLER_SYSTEMD].placement);
return ret;
}
{
char *ret;
- VIR_STEAL_PTR(ret, group->unified.placement);
+ ret = g_steal_pointer(&group->unified.placement);
return ret;
}
goto cleanup;
}
VIR_FREE(contsig);
- VIR_STEAL_PTR(iter, newiter);
+ iter = g_steal_pointer(&newiter);
types = t + 1;
nstruct = skiplen;
narray = (size_t)va_arg(args, int);
VIR_FREE(newiter);
goto cleanup;
}
- VIR_STEAL_PTR(iter, newiter);
+ iter = g_steal_pointer(&newiter);
types = vsig;
nstruct = strlen(types);
narray = (size_t)-1;
goto cleanup;
}
VIR_FREE(contsig);
- VIR_STEAL_PTR(iter, newiter);
+ iter = g_steal_pointer(&newiter);
types = t + 1;
nstruct = skiplen - 2;
narray = (size_t)-1;
nstruct, narray) < 0)
goto cleanup;
VIR_FREE(contsig);
- VIR_STEAL_PTR(iter, newiter);
+ iter = g_steal_pointer(&newiter);
types = t + 1;
nstruct = skiplen;
if (arrayref) {
VIR_DEBUG("Push failed");
goto cleanup;
}
- VIR_STEAL_PTR(iter, newiter);
+ iter = g_steal_pointer(&newiter);
types = vsig;
nstruct = strlen(types);
narray = (size_t)-1;
nstruct, narray) < 0)
goto cleanup;
VIR_FREE(contsig);
- VIR_STEAL_PTR(iter, newiter);
+ iter = g_steal_pointer(&newiter);
types = t + 1;
nstruct = skiplen - 2;
narray = (size_t)-1;
if (virStringListMerge(&devPaths, &recursiveDevPaths) < 0)
goto cleanup;
- VIR_STEAL_PTR(*devPaths_ret, devPaths);
+ *devPaths_ret = g_steal_pointer(&devPaths);
ret = 0;
cleanup:
virStringListFree(recursiveDevPaths);
goto cleanup;
VIR_FREE(err->message);
- VIR_STEAL_PTR(err->message, newmsg);
+ err->message = g_steal_pointer(&newmsg);
cleanup:
va_end(args);
break;
}
- VIR_STEAL_PTR(*value, buf);
+ *value = g_steal_pointer(&buf);
ret = 0;
cleanup:
VIR_FREE(buf);
VIR_DEBUG("Loaded cached data '%s' for '%s'", file, name);
ret = 1;
- VIR_STEAL_PTR(*data, loadData);
+ *data = g_steal_pointer(&loadData);
cleanup:
virObjectUnref(loadData);
return -1;
}
- VIR_STEAL_PTR(*pci, actual);
+ *pci = g_steal_pointer(&actual);
return 0;
}
goto cleanup;
if (STREQ(iqn, initiatoriqn)) {
- VIR_STEAL_PTR(*ifacename, iface);
+ *ifacename = g_steal_pointer(&iface);
VIR_DEBUG("Found interface '%s' with IQN '%s'", *ifacename, iqn);
break;
iface_name, initiatoriqn);
}
- VIR_STEAL_PTR(*ifacename, iface_name);
+ *ifacename = g_steal_pointer(&iface_name);
return 0;
}
for (i = 0; i < object->data.object.npairs; i++) {
if (STREQ(object->data.object.pairs[i].key, key)) {
- VIR_STEAL_PTR(obj, object->data.object.pairs[i].value);
+ obj = g_steal_pointer(&object->data.object.pairs[i].value);
VIR_FREE(object->data.object.pairs[i].key);
VIR_DELETE_ELEMENT(object->data.object.pairs, i,
object->data.object.npairs);
deflattened) < 0)
return NULL;
- VIR_STEAL_PTR(ret, deflattened);
+ ret = g_steal_pointer(&deflattened);
return ret;
}
if (VIR_ALLOC(dev) < 0)
return NULL;
- VIR_STEAL_PTR(dev->path, sysfspath);
+ dev->path = g_steal_pointer(&sysfspath);
/* Check whether the user-provided model corresponds with the actually
* supported mediated device's API.
return NULL;
dev->model = model;
- VIR_STEAL_PTR(ret, dev);
+ ret = g_steal_pointer(&dev);
return ret;
}
#undef MDEV_GET_SYSFS_ATTR
- VIR_STEAL_PTR(*type, tmp);
+ *type = g_steal_pointer(&tmp);
return 0;
}
goto cleanup;
if (virNetDevExists(newname) == 0) {
- VIR_STEAL_PTR(newifname, newname);
+ newifname = g_steal_pointer(&newname);
break;
}
}
return -1;
}
- VIR_STEAL_PTR(*resp, temp_resp);
+ *resp = g_steal_pointer(&temp_resp);
*respbuflen = len;
return 0;
}
goto malformed_resp;
}
- VIR_STEAL_PTR(*nlData, resp);
+ *nlData = g_steal_pointer(&resp);
return 0;
malformed_resp:
goto malformed_resp;
}
- VIR_STEAL_PTR(*nlData, resp);
+ *nlData = g_steal_pointer(&resp);
return recvbuflen;
malformed_resp:
}
}
- VIR_STEAL_PTR(*cpus, cpumap);
+ *cpus = g_steal_pointer(&cpumap);
return ncpus;
}
# undef MASK_CPU_ISSET
return -1;
}
- VIR_STEAL_PTR(*cpuset, allNodesCPUs);
+ *cpuset = g_steal_pointer(&allNodesCPUs);
return 0;
}
break;
} else if (rc == 1) {
VIR_DEBUG("%s %s: iter matched on %s", dev->id, dev->name, check->name);
- VIR_STEAL_PTR(*matched, check);
+ *matched = g_steal_pointer(&check);
ret = 1;
break;
}
if (dirret < 0)
goto cleanup;
- VIR_STEAL_PTR(*types, mdev_types);
+ *types = g_steal_pointer(&mdev_types);
ret = ntypes;
ntypes = 0;
cleanup:
goto cleanup;
}
- VIR_STEAL_PTR(i_level->types[type], i_type);
+ i_level->types[type] = g_steal_pointer(&i_type);
}
ret = 0;
if (rv < 0)
goto cleanup;
- VIR_STEAL_PTR(resctrl->membw_info, i_membw);
+ resctrl->membw_info = g_steal_pointer(&i_membw);
ret = 0;
cleanup:
VIR_FREE(i_membw);
VIR_DEBUG("Resctrl supported %zd monitoring features", nfeatures);
info_monitor->nfeatures = nfeatures;
- VIR_STEAL_PTR(info_monitor->features, features);
- VIR_STEAL_PTR(resctrl->monitor_info, info_monitor);
+ info_monitor->features = g_steal_pointer(&features);
+ resctrl->monitor_info = g_steal_pointer(&info_monitor);
ret = 0;
cleanup:
goto cleanup;
}
- VIR_STEAL_PTR(*monitor, mon);
+ *monitor = g_steal_pointer(&mon);
cleanup:
virResctrlInfoMonFree(mon);
return ret;
}
VIR_FREE(nextpath);
- VIR_STEAL_PTR(nextpath, thispath);
+ nextpath = g_steal_pointer(&thispath);
}
}
if (virAsprintf(&dev->id, "%s:%s", vendor, model) < 0)
return NULL;
- VIR_STEAL_PTR(ret, dev);
+ ret = g_steal_pointer(&dev);
return ret;
}
VIR_DEBUG("%s: initialized", dev->name);
- VIR_STEAL_PTR(ret, dev);
+ ret = g_steal_pointer(&dev);
return ret;
}
}
}
- VIR_STEAL_PTR(ret, encdef);
+ ret = g_steal_pointer(&encdef);
cleanup:
VIR_FREE(format_str);
if (VIR_STRDUP(def->path, path) < 0)
return NULL;
- VIR_STEAL_PTR(ret, def);
+ ret = g_steal_pointer(&def);
return ret;
}
* update the metadata.*/
meta->type = VIR_STORAGE_TYPE_DIR;
meta->format = VIR_STORAGE_FILE_DIR;
- VIR_STEAL_PTR(ret, meta);
+ ret = g_steal_pointer(&meta);
return ret;
}
else if (S_ISBLK(sb.st_mode))
meta->type = VIR_STORAGE_TYPE_BLOCK;
- VIR_STEAL_PTR(ret, meta);
+ ret = g_steal_pointer(&meta);
return ret;
}
if (virSecretLookupDefCopy(&authdef->seclookupdef, &src->seclookupdef) < 0)
return NULL;
- VIR_STEAL_PTR(ret, authdef);
+ ret = g_steal_pointer(&authdef);
return ret;
}
if (virSecretLookupParseSecret(secretnode, &authdef->seclookupdef) < 0)
goto cleanup;
- VIR_STEAL_PTR(ret, authdef);
+ ret = g_steal_pointer(&authdef);
cleanup:
ctxt->node = saveNode;
goto cleanup;
}
- VIR_STEAL_PTR(prd->path, path);
- VIR_STEAL_PTR(ret, prd);
+ prd->path = g_steal_pointer(&path);
+ ret = g_steal_pointer(&prd);
cleanup:
virStoragePRDefFree(prd);
VIR_STRDUP(copy->mgralias, src->mgralias) < 0)
goto cleanup;
- VIR_STEAL_PTR(ret, copy);
+ ret = g_steal_pointer(©);
cleanup:
virStoragePRDefFree(copy);
return NULL;
}
- VIR_STEAL_PTR(ret, def);
+ ret = g_steal_pointer(&def);
return ret;
}
def->type = VIR_STORAGE_TYPE_FILE;
}
- VIR_STEAL_PTR(ret, def);
+ ret = g_steal_pointer(&def);
return ret;
}
/* pool vs. image name */
if ((p = strchr(src->path, '/'))) {
- VIR_STEAL_PTR(src->volume, src->path);
+ src->volume = g_steal_pointer(&src->path);
if (VIR_STRDUP(src->path, p + 1) < 0)
return -1;
*p = '\0';
if (VIR_STRDUP(authdef->secrettype,
virSecretUsageTypeToString(VIR_SECRET_USAGE_TYPE_CEPH)) < 0)
return -1;
- VIR_STEAL_PTR(src->auth, authdef);
+ src->auth = g_steal_pointer(&authdef);
src->authInherited = true;
/* Cannot formulate a secretType (eg, usage or uuid) given
}
}
- VIR_STEAL_PTR(*src, def);
+ *src = g_steal_pointer(&def);
return rc;
}
def->detected = true;
- VIR_STEAL_PTR(*child, def);
+ *child = g_steal_pointer(&def);
return rc;
}
return -1;
}
- VIR_STEAL_PTR(*relpath, path);
+ *relpath = g_steal_pointer(&path);
return 0;
}
goto cleanup;
}
- VIR_STEAL_PTR(src->backingStore, backingStore);
+ src->backingStore = g_steal_pointer(&backingStore);
if (src->externalDataStoreRaw) {
g_autoptr(virStorageSource) externalDataStore = NULL;
goto cleanup;
}
- VIR_STEAL_PTR(src->externalDataStore, externalDataStore);
+ src->externalDataStore = g_steal_pointer(&externalDataStore);
}
ret = 0;
if (virStorageFileGetMetadataInternal(tmp, buf, headerLen, NULL) < 0)
return -1;
- VIR_STEAL_PTR(*backing, tmp->backingStoreRaw);
+ *backing = g_steal_pointer(&tmp->backingStoreRaw);
return 0;
}
{
size_t ret = list->npar;
- VIR_STEAL_PTR(*params, list->par);
+ *params = g_steal_pointer(&list->par);
list->npar = 0;
list->par_alloc = 0;