mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
conf: ns.parse: decouple call from condition
In the future we will perform more actions if ns.parse is present. Decouple the condition from the actual call. Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
parent
cf400975f3
commit
94c34cbd66
@ -21343,9 +21343,10 @@ virDomainDefParseXML(xmlDocPtr xml,
|
|||||||
*/
|
*/
|
||||||
def->ns = xmlopt->ns;
|
def->ns = xmlopt->ns;
|
||||||
|
|
||||||
if (def->ns.parse &&
|
if (def->ns.parse) {
|
||||||
(def->ns.parse)(ctxt, &def->namespaceData) < 0)
|
if ((def->ns.parse)(ctxt, &def->namespaceData) < 0)
|
||||||
goto error;
|
goto error;
|
||||||
|
}
|
||||||
|
|
||||||
return def;
|
return def;
|
||||||
|
|
||||||
|
@ -2050,9 +2050,10 @@ virNetworkDefParseXML(xmlXPathContextPtr ctxt,
|
|||||||
|
|
||||||
if (xmlopt)
|
if (xmlopt)
|
||||||
def->ns = xmlopt->ns;
|
def->ns = xmlopt->ns;
|
||||||
if (def->ns.parse &&
|
if (def->ns.parse) {
|
||||||
(def->ns.parse)(ctxt, &def->namespaceData) < 0)
|
if ((def->ns.parse)(ctxt, &def->namespaceData) < 0)
|
||||||
goto error;
|
goto error;
|
||||||
|
}
|
||||||
|
|
||||||
ctxt->node = save;
|
ctxt->node = save;
|
||||||
return def;
|
return def;
|
||||||
|
@ -997,9 +997,10 @@ virStoragePoolDefParseXML(xmlXPathContextPtr ctxt)
|
|||||||
/* Make a copy of all the callback pointers here for easier use,
|
/* Make a copy of all the callback pointers here for easier use,
|
||||||
* especially during the virStoragePoolSourceClear method */
|
* especially during the virStoragePoolSourceClear method */
|
||||||
def->ns = options->ns;
|
def->ns = options->ns;
|
||||||
if (def->ns.parse &&
|
if (def->ns.parse) {
|
||||||
(def->ns.parse)(ctxt, &def->namespaceData) < 0)
|
if ((def->ns.parse)(ctxt, &def->namespaceData) < 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
VIR_STEAL_PTR(ret, def);
|
VIR_STEAL_PTR(ret, def);
|
||||||
return ret;
|
return ret;
|
||||||
|
Loading…
Reference in New Issue
Block a user