From 975056af89ae8c1d066f21329afbb7594e2aecb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1n=20Tomko?= Date: Tue, 20 Aug 2019 22:50:15 +0200 Subject: [PATCH] conf: network: use virXMLNamespaceFormatNS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ján Tomko Reviewed-by: Jiri Denemark --- src/conf/network_conf.c | 4 ++-- src/network/bridge_driver.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c index 2c3a11fb10..52b9f0e311 100644 --- a/src/conf/network_conf.c +++ b/src/conf/network_conf.c @@ -2434,8 +2434,8 @@ virNetworkDefFormatBuf(virBufferPtr buf, bool hasbridge = false; virBufferAddLit(buf, "namespaceData && def->ns.href) - virBufferAsprintf(buf, " %s", (def->ns.href)()); + if (def->namespaceData && def->ns.format) + virXMLNamespaceFormatNS(buf, &def->ns); if (!(flags & VIR_NETWORK_XML_INACTIVE) && (def->connections > 0)) virBufferAsprintf(buf, " connections='%d'", def->connections); if (def->ipv6nogw) diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index b0ada0132a..a3f7ae337a 100644 --- a/src/network/bridge_driver.c +++ b/src/network/bridge_driver.c @@ -244,7 +244,7 @@ networkDnsmasqDefNamespaceFormatXML(virBufferPtr buf, static const char * networkDnsmasqDefNamespaceHref(void) { - return "xmlns:dnsmasq='" DNSMASQ_NAMESPACE_HREF "'"; + return DNSMASQ_NAMESPACE_HREF; } -- GitLab