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

Re: [Xen-devel] [PATCH v2 2/5] libxl: make GC_FREE reachable in libxl_get_scheduler()

Chester Lin writes ("[PATCH v2 2/5] libxl: make GC_FREE reachable in 
> To make this semantically consistent, change the return type of
> libxl_get_scheduler() from libxl_scheduler to int, and make a note of
> the interpretation of the return value in libxl.h.  N.B. This change
> breaks neither the API nor the ABI of libxl.

This is as we discussed, I think, thanks.

One nit:

> -libxl_scheduler libxl_get_scheduler(libxl_ctx *ctx)
> +int libxl_get_scheduler(libxl_ctx *ctx)
>  {
> -    int r, sched;
> +    int r, ret;

I see that CODING_STYLE doesn't discuss this directly, but I'm not
very keen on the use of `ret' for this variable name.  There is quite
a lot of code elsewhere where `ret' is used simply for libxl error

I think the name `sched' is fine and that here

> -        return ERROR_FAIL;
> -        GC_FREE;
> +        ret = ERROR_FAIL;

  +        sched = ERROR_FAIL;

would be fine.

(But this is a bikeshed style issue that others may disagree about so
please let's see what they think before you rework the patch...)


Xen-devel mailing list



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