Re: [PATCH 04/10] conf: Clean up virDomain{Memory, Shmem}DefParseXML()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jun 29, 2017 at 20:03:57 +0200, Andrea Bolognani wrote:
> Follow the same style as other similar functions.
> 
> Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx>
> ---
>  src/conf/domain_conf.c | 36 ++++++++++++++++++------------------
>  1 file changed, 18 insertions(+), 18 deletions(-)
> 
> diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
> index ccd3c27..fdb919d 100644
> --- a/src/conf/domain_conf.c
> +++ b/src/conf/domain_conf.c

[...]

> @@ -13219,20 +13218,21 @@ virDomainShmemDefParseXML(xmlNodePtr node,
>      if (def->msi.enabled && !def->server.enabled) {
>          virReportError(VIR_ERR_XML_ERROR, "%s",
>                         _("msi option is only supported with a server"));
> -        goto cleanup;
> +        goto error;
>      }
>  
>      if (virDomainDeviceInfoParseXML(node, NULL, &def->info, flags) < 0)
> -        goto cleanup;
> -
> +        goto error;
>  
> -    ret = def;
> -    def = NULL;
>   cleanup:
> -    ctxt->node = save;
>      VIR_FREE(tmp);
> +    ctxt->node = save;
> +    return def;
> +
> + error:
>      virDomainShmemDefFree(def);
> -    return ret;
> +    def = NULL;
> +    goto cleanup;

I don't see how this is better than it was before.

Attachment: signature.asc
Description: Digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux