aboutsummaryrefslogtreecommitdiff
path: root/util/qemu-progress.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2024-08-15 14:12:05 +0100
committerPeter Maydell <peter.maydell@linaro.org>2024-09-19 13:13:58 +0100
commit28d2d03c9c221b204707186dd819fe7407377d12 (patch)
tree9bec0b2152ce6569dcacab96e9b882be5a251ccb /util/qemu-progress.c
parent95cbddcb1039517c0e43903a112f08659f2adc62 (diff)
kvm: Make 'mmap_size' be 'int' in kvm_init_vcpu(), do_kvm_destroy_vcpu()
In kvm_init_vcpu()and do_kvm_destroy_vcpu(), the return value from kvm_ioctl(..., KVM_GET_VCPU_MMAP_SIZE, ...) is an 'int', but we put it into a 'long' logal variable mmap_size. Coverity then complains that there might be a truncation when we copy that value into the 'int ret' which we use for returning a value in an error-exit codepath. This can't ever actually overflow because the value was in an 'int' to start with, but it makes more sense to use 'int' for mmap_size so we don't do the widen-then-narrow sequence in the first place. Resolves: Coverity CID 1547515 Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-id: 20240815131206.3231819-2-peter.maydell@linaro.org
Diffstat (limited to 'util/qemu-progress.c')
0 files changed, 0 insertions, 0 deletions