mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00: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;
|
||||
|
||||
if (def->ns.parse &&
|
||||
(def->ns.parse)(ctxt, &def->namespaceData) < 0)
|
||||
goto error;
|
||||
if (def->ns.parse) {
|
||||
if ((def->ns.parse)(ctxt, &def->namespaceData) < 0)
|
||||
goto error;
|
||||
}
|
||||
|
||||
return def;
|
||||
|
||||
|
@ -2050,9 +2050,10 @@ virNetworkDefParseXML(xmlXPathContextPtr ctxt,
|
||||
|
||||
if (xmlopt)
|
||||
def->ns = xmlopt->ns;
|
||||
if (def->ns.parse &&
|
||||
(def->ns.parse)(ctxt, &def->namespaceData) < 0)
|
||||
goto error;
|
||||
if (def->ns.parse) {
|
||||
if ((def->ns.parse)(ctxt, &def->namespaceData) < 0)
|
||||
goto error;
|
||||
}
|
||||
|
||||
ctxt->node = save;
|
||||
return def;
|
||||
|
@ -997,9 +997,10 @@ virStoragePoolDefParseXML(xmlXPathContextPtr ctxt)
|
||||
/* Make a copy of all the callback pointers here for easier use,
|
||||
* especially during the virStoragePoolSourceClear method */
|
||||
def->ns = options->ns;
|
||||
if (def->ns.parse &&
|
||||
(def->ns.parse)(ctxt, &def->namespaceData) < 0)
|
||||
return NULL;
|
||||
if (def->ns.parse) {
|
||||
if ((def->ns.parse)(ctxt, &def->namespaceData) < 0)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
VIR_STEAL_PTR(ret, def);
|
||||
return ret;
|
||||
|
Loading…
x
Reference in New Issue
Block a user