|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 04/10] xl: improve return code for freemem function
On Fri, 1 Apr 2016, Paulina Szubarczyk wrote:
> - Return 0 or 1 for freemem function
> - Correct the condition of checking return values of freemem
>
> Signed-off-by: Paulina Szubarczyk <paulinaszubarczyk@xxxxxxxxx>
> ---
> tools/libxl/xl_cmdimpl.c | 26 +++++++++++---------------
> 1 file changed, 11 insertions(+), 15 deletions(-)
>
> diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
> index 7750995..7ee6953 100644
> --- a/tools/libxl/xl_cmdimpl.c
> +++ b/tools/libxl/xl_cmdimpl.c
> @@ -2678,38 +2678,34 @@ static int preserve_domain(uint32_t *r_domid,
> libxl_event *event,
>
> static int freemem(uint32_t domid, libxl_domain_build_info *b_info)
> {
> - int rc, retries = 3;
> + int retries = 3;
> uint32_t need_memkb, free_memkb;
>
> if (!autoballoon)
> return 0;
>
> - rc = libxl_domain_need_memory(ctx, b_info, &need_memkb);
> - if (rc < 0)
> - return rc;
> + if (libxl_domain_need_memory(ctx, b_info, &need_memkb) < 0)
> + return 1;
As noted on patch 02/10, this is against libxl coding style.
Roger.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |