|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 5/9] libxl: introduce libxl_cpupool_cpu{add, remove}_cpumap()
On Mon, 2015-03-09 at 10:39 +0000, Wei Liu wrote:
> rc = xc_cpupool_addcpu(ctx->xch, poolid, cpu);
> > if (rc) {
> > - LIBXL__LOG_ERRNOVAL(ctx, LIBXL__LOG_ERROR, rc,
> > - "Error moving cpu to cpupool");
> > + LOGE(ERROR, "Error moving cpu %d to cpupool", cpu);
> > + GC_FREE;
> > return ERROR_FAIL;
> > }
> > + GC_FREE;
>
> Please use "goto" idiom. Same applies to libxl_cpupool_cpuremove.
TBH I think using LIBXL__LOG_ERRNOVAL in functions where the GC is
otherwise unneeded in the entire call-chain, like here, is a reasonable
exception to the usual rule.
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |