From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Jackson Subject: Re: [PATCH v2 2/5] libxl: make GC_FREE reachable in libxl_get_scheduler() Date: Tue, 19 Jan 2016 14:15:25 +0000 Message-ID: <22174.17661.345151.669856@mariner.uk.xensource.com> References: <1451992597.13361.231.camel@citrix.com> <1453183061-50484-1-git-send-email-czylin@uwaterloo.ca> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1453183061-50484-1-git-send-email-czylin@uwaterloo.ca> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Chester Lin Cc: wei.liu2@citrix.com, ian.campbell@citrix.com, stefano.stabellini@eu.citrix.com, dario.faggioli@citrix.com, xen-devel@lists.xen.org, jtotto@uwaterloo.ca, hjarmstr@uwaterloo.ca List-Id: xen-devel@lists.xenproject.org Chester Lin writes ("[PATCH v2 2/5] libxl: make GC_FREE reachable in libxl_get_scheduler()"): > 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 codes. 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...) Ian.