1clarify type conversion
2
3fixes
4| ruli_rand.c:54:47: error: implicit conversion from 'unsigned int' to 'float' changes value from 4294967295 to 4294967296 [-Werror,-Wimplicit-int-float-conversion]
5|
6
7Upstream-Status: Pending
8Signed-off-by: Khem Raj <raj.khem@gmail.com>
9--- a/src/ruli_rand.c
10+++ b/src/ruli_rand.c
11@@ -51,7 +51,7 @@ int ruli_rand_next(ruli_rand_t *rand_ctx
12
13   u = isaac_rand(&rand_ctx->isaac_ctx);
14
15-  r = (int) ((float) (1.0 + max - min) *  u / ISAAC_UB4MAXVAL + min);
16+  r = (int) ((float) (1.0 + max - min) *  u / (float) (ISAAC_UB4MAXVAL + min));
17
18   assert(min <= r);
19   assert(r <= max);
20