Signed-off-by: Ján Tomko <jtomko(a)redhat.com>
---
src/util/virrandom.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/util/virrandom.c b/src/util/virrandom.c
index 0487b4e70b..6417232e3a 100644
--- a/src/util/virrandom.c
+++ b/src/util/virrandom.c
@@ -92,8 +92,7 @@ uint32_t virRandomInt(uint32_t max)
if ((max & (max - 1)) == 0)
return virRandomBits(__builtin_ffs(max) - 1);
- double val = virRandom();
- return val * max;
+ return virRandom() * max;
}
--
2.26.2