Re: [Xen-devel] [PATCH] tools/libxl: cleanup one libxl__calloc() usage

2015-03-11 Thread Ian Campbell
On Tue, 2015-03-10 at 09:21 +, 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)

Re: [Xen-devel] [PATCH] tools/libxl: cleanup one libxl__calloc() usage

2015-03-10 Thread Wei Liu
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, si

[Xen-devel] [PATCH] tools/libxl: cleanup one libxl__calloc() usage

2015-03-09 Thread Tiejun Chen
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: