]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Explicitly convert type to double to avoid losing precision
authorEgor Makrushin <emakrushin@astralinux.ru>
Tue, 23 Jan 2024 09:28:34 +0000 (12:28 +0300)
committerMartin Kletzander <mkletzan@redhat.com>
Wed, 24 Jan 2024 09:21:23 +0000 (10:21 +0100)
commitf70b7c9772f23a8e370e88c856541c36fddcb2a7
treec4993729e4981eb0d6609964a9e621d144042667
parentab9da5c4abe3a53a883ee4a1e93561237bd0aa68
Explicitly convert type to double to avoid losing precision

Division between integers will also be integer.
Thus, to preserve fractional part explicitly
convert first operand to double.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: 28d54aab05 ("examples: Introduce domtop")
Signed-off-by: Egor Makrushin <emakrushin@astralinux.ru>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
examples/c/domain/domtop.c