From: Ian Campbell Subject: Re: [PATCH 13/29] libxl: check for xc_domain_max_vcpus failure in libxl__build_pre Date: Thu, 31 Oct 2013 21:29:54 +0000 Message-ID: <1383254994.5436.145.camel@dagon.hellion.org.uk> References: <1383119525-26033-1-git-send-email-mattjd@gmail.com> <1383119525-26033-14-git-send-email-mattjd@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1383119525-26033-14-git-send-email-mattjd@gmail.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Matthew Daley Cc: Stefano Stabellini , Ian Jackson , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Wed, 2013-10-30 at 20:51 +1300, Matthew Daley wrote: > Coverity-ID: 1055047 > Signed-off-by: Matthew Daley > --- > tools/libxl/libxl_dom.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/tools/libxl/libxl_dom.c b/tools/libxl/libxl_dom.c > index 1873459..5b9fd27 100644 > --- a/tools/libxl/libxl_dom.c > +++ b/tools/libxl/libxl_dom.c > @@ -209,7 +209,10 @@ int libxl__build_pre(libxl__gc *gc, uint32_t domid, > char *xs_domid, *con_domid; > int rc; > > - xc_domain_max_vcpus(ctx->xch, domid, info->max_vcpus); > + if (xc_domain_max_vcpus(ctx->xch, domid, info->max_vcpus) != 0) { > + LOG(ERROR, "Couldn't get max vcpu count"); This function is a setter, isn't it? > + return ERROR_FAIL; > + } > > /* > * Check if the domain has any CPU affinity. If not, try to build