[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] tools/libxl: cleanup one libxl__calloc() usage
commit 7f0638e914a542f20e8bb369dd476dfc6c020f0a Author: Tiejun Chen <tiejun.chen@xxxxxxxxx> AuthorDate: Tue Mar 10 14:28:16 2015 +0800 Commit: Ian Campbell <ian.campbell@xxxxxxxxxx> CommitDate: Wed Mar 11 11:36:39 2015 +0000 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> Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx> Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx> --- tools/libxl/libxl_dm.c | 4 ---- 1 files changed, 0 insertions(+), 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; -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |