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@lists.xen.org
http://lists.xen.org/xen-devel

Reply via email to