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

Re: [Xen-devel] [OPW PATCH] tools/xl:Making _dispose function simplicity for libxl_dominfo



On 26/10/14 18:55, Uma Sharma wrote:
> This patch simplifies the call to dispose for libxl_dominfo *info.
> _dispose was called multiple times in tools/libxl/xl_cmdimpl.c
> IDL generated libxl types should be used only after calling the init
> function.
>
> Signed-off-by: Uma Sharma <uma.sharma523@xxxxxxxxx>
> --
> diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
> index 5325a52..9a6ceb3 100644
> --- a/tools/libxl/xl_cmdimpl.c
> +++ b/tools/libxl/xl_cmdimpl.c
> @@ -4375,12 +4375,8 @@ int main_list(int argc, char **argv)
>          list_domains_details(info, nb_domain);
>      else
>          list_domains(verbose, context, 0 /* claim */, numa, info, nb_domain);
> -
> -    if (info_free)
> -        libxl_dominfo_list_free(info, nb_domain);
> -    else
> -     libxl_dominfo_dispose(info);
> -
> +    
> +    libxl_dominfo_list_free(info, nb_domain);

Unrelated to the code in the patch, observe from the first - and first +
that you have introduced trailing whitespace with this change, which
should be avoided.

If you can, configure your editor to highlight trailing whitespace.

~Andrew


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.