about summary refs log tree commit diff
path: root/benchtests/bench-malloc-thread.c
diff options
context:
space:
mode:
Diffstat (limited to 'benchtests/bench-malloc-thread.c')
-rw-r--r--benchtests/bench-malloc-thread.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/benchtests/bench-malloc-thread.c b/benchtests/bench-malloc-thread.c
index 46fdabd30c..74e71ec9ce 100644
--- a/benchtests/bench-malloc-thread.c
+++ b/benchtests/bench-malloc-thread.c
@@ -63,7 +63,7 @@ get_block_size (unsigned int rand_data)
   float min_pow = powf (dist_min, exponent + 1);
   float max_pow = powf (dist_max, exponent + 1);
 
-  float r = (float) rand_data / RAND_MAX;
+  float r = (float) rand_data / (float) RAND_MAX;
 
   return (unsigned int) powf ((max_pow - min_pow) * r + min_pow,
 			      1 / (exponent + 1));