mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00:00
conf: network: use virXMLNamespaceRegister
Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
parent
37a11c3726
commit
8879554015
@ -2051,6 +2051,8 @@ virNetworkDefParseXML(xmlXPathContextPtr ctxt,
|
||||
if (xmlopt)
|
||||
def->ns = xmlopt->ns;
|
||||
if (def->ns.parse) {
|
||||
if (virXMLNamespaceRegister(ctxt, &def->ns) < 0)
|
||||
goto error;
|
||||
if ((def->ns.parse)(ctxt, &def->namespaceData) < 0)
|
||||
goto error;
|
||||
}
|
||||
|
@ -69,8 +69,6 @@
|
||||
#include "virjson.h"
|
||||
#include "virnetworkportdef.h"
|
||||
|
||||
#include <libxml/xpathInternals.h>
|
||||
|
||||
#define VIR_FROM_THIS VIR_FROM_NETWORK
|
||||
#define MAX_BRIDGE_ID 256
|
||||
|
||||
@ -191,14 +189,6 @@ networkDnsmasqDefNamespaceParse(xmlXPathContextPtr ctxt,
|
||||
networkDnsmasqXmlNsDefPtr nsdata = NULL;
|
||||
int ret = -1;
|
||||
|
||||
if (xmlXPathRegisterNs(ctxt, BAD_CAST "dnsmasq",
|
||||
BAD_CAST DNSMASQ_NAMESPACE_HREF) < 0) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("Failed to register xml namespace '%s'"),
|
||||
DNSMASQ_NAMESPACE_HREF);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (VIR_ALLOC(nsdata) < 0)
|
||||
return -1;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user