mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
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@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
This commit is contained in:
1 parent
700772bc13
commit
6919a7dde4
1 file changed
+2
-1
@@ -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;
|
||||
}
|
||||
|
||||