aboutsummaryrefslogtreecommitdiffstats
path: root/src/string
diff options
context:
space:
mode:
Diffstat (limited to 'src/string')
-rw-r--r--src/string/strfry.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/string/strfry.c b/src/string/strfry.c
index 5aec420..cf6324b 100644
--- a/src/string/strfry.c
+++ b/src/string/strfry.c
@@ -37,11 +37,11 @@
static size_t
uniform_random_zu(size_t max)
{
- size_t n = max, r = 0, mask = max, s = 1;
+ size_t n, r = 0, mask = max, s = 1;
while (((mask + 1) & ~mask) != mask + 1)
mask |= mask >> s++;
do
- for (; n; n >>= BITS)
+ for (n = max; n; n >>= BITS)
{
b = rand();
b /= (double)RAND_MAX + 1;