Make __rand_0_1() compatible with clang
This patch fixes the following clang compiler error:
crc/../arch/../lib/rand.h:109:25: error: implicit conversion from
'unsigned long long' to 'double' changes value from
18446744073709551615
to
18446744073709551616 [-Werror,-Wimplicit-int-float-conversion]
return (val + 1.0) / (FRAND64_MAX + 1.0);
^~~~~~~~~~~ ~
crc/../arch/../lib/rand.h:9:22: note: expanded from macro 'FRAND64_MAX'
#define FRAND64_MAX (-1ULL)
^~~~~
Fixes:
e7b240474543 ("Fixups for poisson rate")
Signed-off-by: Bart Van Assche <bvanassche@acm.org>