Re: [Xen-devel] [PATCH] libxl: fix handling returns in libxl_get_version_info()

2016-02-12 Thread Dario Faggioli
On Fri, 2016-02-12 at 16:34 +0530, Harmandeep Kaur wrote: > On Fri, Feb 12, 2016 at 4:30 PM, Dario Faggioli > wrote: > >  > Sorry I actually meant, > tools/libxl/xl_cmdimpl.c:vinfo = libxl_get_version_info(ctx); > > vinfo = libxl_get_version_info(ctx); > if (vinfo) { > Which again checks

Re: [Xen-devel] [PATCH] libxl: fix handling returns in libxl_get_version_info()

2016-02-12 Thread Harmandeep Kaur
On Fri, Feb 12, 2016 at 4:30 PM, Dario Faggioli wrote: > On Fri, 2016-02-12 at 16:22 +0530, Harmandeep Kaur wrote: >> On Thu, Feb 11, 2016 at 3:18 PM, Dario Faggioli >> wrote: >> > >> > Another thing that you should check, and probably quickly mention >> > too, >> > is whether or not the callers

Re: [Xen-devel] [PATCH] libxl: fix handling returns in libxl_get_version_info()

2016-02-12 Thread Dario Faggioli
On Fri, 2016-02-12 at 16:22 +0530, Harmandeep Kaur wrote: > On Thu, Feb 11, 2016 at 3:18 PM, Dario Faggioli > wrote: > >  > > Another thing that you should check, and probably quickly mention > > too, > > is whether or not the callers of these functions --the ones inside > > xen.git of course-- ar

Re: [Xen-devel] [PATCH] libxl: fix handling returns in libxl_get_version_info()

2016-02-12 Thread Harmandeep Kaur
On Thu, Feb 11, 2016 at 3:18 PM, Dario Faggioli wrote: > Hi Harmandeep, > > So, I think the code in this patch is ok. Still, a few comments... > > On Thu, 2016-02-11 at 14:00 +0530, Harmandeep Kaur wrote: >> Avoid handling issue of the return value of xc_version() in many >> cases. >> > This can b

Re: [Xen-devel] [PATCH] libxl: fix handling returns in libxl_get_version_info()

2016-02-11 Thread Ian Campbell
On Thu, 2016-02-11 at 10:48 +0100, Dario Faggioli wrote: > I think it would be better if you make the patch in such a way that the > final code would look like this: > >     r = xc_version(ctx->xch, XENVER_extraversion, &u.xen_extra); >     if ( r < 0 ) >         goto out; >     info->xen_version_

Re: [Xen-devel] [PATCH] libxl: fix handling returns in libxl_get_version_info()

2016-02-11 Thread Dario Faggioli
Hi Harmandeep, So, I think the code in this patch is ok. Still, a few comments... On Thu, 2016-02-11 at 14:00 +0530, Harmandeep Kaur wrote: > Avoid handling issue of the return value of xc_version() in many > cases. > This can be rephrased to be easier to understand (I'm not sure I can tell what

[Xen-devel] [PATCH] libxl: fix handling returns in libxl_get_version_info()

2016-02-11 Thread Harmandeep Kaur
Avoid handling issue of the return value of xc_version() in many cases. Coverity ID 1351217 Signed-off-by: Harmandeep Kaur --- tools/libxl/libxl.c | 39 ++- 1 file changed, 30 insertions(+), 9 deletions(-) diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl