[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] xl: initialise rc before using it in vcpuset
commit 6919a7dde48bf1a9314c328bfb93a8a2f741bb80 Author: Wei Liu <wei.liu2@xxxxxxxxxx> AuthorDate: Wed Nov 4 11:32:57 2015 +0000 Commit: Ian Campbell <ian.campbell@xxxxxxxxxx> CommitDate: Wed Nov 4 11:37:33 2015 +0000 xl: initialise rc before using it in vcpuset In 5b725e56 (xl: improve return and exit codes of vcpu related functions), the return value of libxl_cpu_bitmap_alloc was not stored in rc anymore. Yet the subsequent fprintf still used that. Reinstate the original implementation, that is, to store return value of libxl_cpu_bitmap_alloc in rc before using rc. Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx> Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx> --- tools/libxl/xl_cmdimpl.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c index 2756d2f..9b6b42c 100644 --- a/tools/libxl/xl_cmdimpl.c +++ b/tools/libxl/xl_cmdimpl.c @@ -5473,7 +5473,8 @@ static int vcpuset(uint32_t domid, const char* nr_vcpus, int check_host) if (rc) return 1; } - if (libxl_cpu_bitmap_alloc(ctx, &cpumap, max_vcpus)) { + rc = libxl_cpu_bitmap_alloc(ctx, &cpumap, max_vcpus); + if (rc) { fprintf(stderr, "libxl_cpu_bitmap_alloc failed, rc: %d\n", rc); return 1; } -- 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 |