[libvirt] [PATCH 15/21] conf: network: use virXMLNamespaceFormatNS

Jiri Denemark jdenemar at redhat.com
Wed Aug 21 07:13:07 UTC 2019


On Wed, Aug 21, 2019 at 01:15:37 +0200, Ján Tomko wrote:
> Signed-off-by: Ján Tomko <jtomko at redhat.com>
> ---
>  src/conf/network_conf.c     | 2 +-
>  src/network/bridge_driver.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c
> index 2c3a11fb10..7eba9eacbf 100644
> --- a/src/conf/network_conf.c
> +++ b/src/conf/network_conf.c
> @@ -2435,7 +2435,7 @@ virNetworkDefFormatBuf(virBufferPtr buf,
>  
>      virBufferAddLit(buf, "<network");
>      if (def->namespaceData && def->ns.href)

I guess this could benefit from the same treatment you did for domains.
That is, check for def->ns.format instead.

> -        virBufferAsprintf(buf, " %s", (def->ns.href)());
> +        virXMLNamespaceFormatNS(buf, &def->ns);
>      if (!(flags & VIR_NETWORK_XML_INACTIVE) && (def->connections > 0))
>          virBufferAsprintf(buf, " connections='%d'", def->connections);
>      if (def->ipv6nogw)

Reviewed-by: Jiri Denemark <jdenemar at redhat.com>




More information about the libvir-list mailing list