[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH] tools/libxl: cleanup one libxl__calloc() usage
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 <tiejun.chen@xxxxxxxxx> --- tools/libxl/libxl_dm.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c index 8599a6a..cb006df 100644 --- a/tools/libxl/libxl_dm.c +++ b/tools/libxl/libxl_dm.c @@ -1175,10 +1175,6 @@ static void spawn_stub_launch_dm(libxl__egc *egc, num_console++; console = libxl__calloc(gc, num_console, sizeof(libxl__device_console)); - if (!console) { - ret = ERROR_NOMEM; - goto out; - } for (i = 0; i < num_console; i++) { libxl__device device; -- 1.9.1 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |