virSaveCookieParse: Cleanup

Remove unnecessary label and goto.

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Tim Wiederhake 2021-11-08 11:19:15 +01:00
parent bea22ecfe2
commit 6ba7e1b330

View File

@ -58,19 +58,14 @@ virSaveCookieParse(xmlXPathContextPtr ctxt,
virSaveCookieCallbacks *saveCookie)
{
VIR_XPATH_NODE_AUTORESTORE(ctxt)
int ret = -1;
*obj = NULL;
if (!(ctxt->node = virXPathNode("./cookie", ctxt))) {
ret = 0;
goto cleanup;
return 0;
}
ret = virSaveCookieParseNode(ctxt, obj, saveCookie);
cleanup:
return ret;
return virSaveCookieParseNode(ctxt, obj, saveCookie);
}