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

Re: [Xen-devel] [PATCH 1/5] libxl: tidy libxl_get_scheduler() according to CODING_STYLE



On Mon, 2016-01-04 at 16:23 +0000, Ian Campbell wrote:
> On Mon, 2015-12-28 at 00:16 -0500, Joshua Otto wrote:
>
> > diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
> > @@ -5585,10 +5585,11 @@ out:
> > Â
> > Âlibxl_scheduler libxl_get_scheduler(libxl_ctx *ctx)
> > Â{
> > -ÂÂÂÂlibxl_scheduler sched, ret;
> > ÂÂÂÂÂGC_INIT(ctx);
> > -ÂÂÂÂif ((ret = xc_sched_id(ctx->xch, (int *)&sched)) != 0) {
> > -ÂÂÂÂÂÂÂÂLOGE(ERROR, "getting domain info list");
> > +ÂÂÂÂlibxl_scheduler sched;
> > +ÂÂÂÂint r = xc_sched_id(ctx->xch, (int *)&sched);
>Â
> Safer (and cleaner looking even if I'm wrong) would be to use a
> temporary
> int for the function call and turn it into an enum implicitly in the
> return.
> 
FWIW, +1 to this

Regadrs,
Dario
-- 
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
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®.