virDomainXMLOptionPtr xmlopt)
{
VIR_XPATH_NODE_AUTORESTORE(ctxt);
- int ret = -1;
if (!(flags & VIR_DOMAIN_DEF_PARSE_STATUS) ||
!xmlopt || !xmlopt->privateData.storageParse)
ctxt->node = node;
- if (!(ctxt->node = virXPathNode("./privateData", ctxt))) {
- ret = 0;
- goto cleanup;
- }
+ if (!(ctxt->node = virXPathNode("./privateData", ctxt)))
+ return 0;
if (xmlopt->privateData.storageParse(ctxt, src) < 0)
- goto cleanup;
-
- ret = 0;
+ return -1;
- cleanup:
- return ret;
+ return 0;
}
virStoragePRDefPtr *pr)
{
VIR_XPATH_NODE_AUTORESTORE(ctxt);
- int ret = -1;
ctxt->node = node;
- if (!(ctxt->node = virXPathNode("./reservations", ctxt))) {
- ret = 0;
- goto cleanup;
- }
+ if (!(ctxt->node = virXPathNode("./reservations", ctxt)))
+ return 0;
if (!(*pr = virStoragePRDefParseXML(ctxt)))
- goto cleanup;
+ return -1;
- ret = 0;
- cleanup:
- return ret;
+ return 0;
}