From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH] tools/libxl: cleanup one libxl__calloc() usage Date: Wed, 11 Mar 2015 12:30:52 +0000 Message-ID: <1426077052.21353.231.camel@citrix.com> References: <1425968896-27199-1-git-send-email-tiejun.chen@intel.com> <20150310092146.GA4330@zion.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20150310092146.GA4330@zion.uk.xensource.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: Wei Liu Cc: Tiejun Chen , xen-devel@lists.xen.org, ian.jackson@eu.citrix.com, stefano.stabellini@eu.citrix.com List-Id: xen-devel@lists.xenproject.org On Tue, 2015-03-10 at 09:21 +0000, Wei Liu wrote: > On Tue, Mar 10, 2015 at 02:28:16PM +0800, Tiejun Chen wrote: > > Its pointless because internally, libxl__calloc() would always > > terminate program execution if failed, > > > > libxl__calloc() > > | > > + void *ptr = calloc(nmemb, size); > > + if (!ptr) libxl__alloc_failed(CTX, __func__, nmemb, size); > > | > > + _exit(-1); > > > > Signed-off-by: Tiejun Chen > > Acked-by: Wei Liu Likewise + applied, thanks.