diff --git a/src/backend.c b/src/backend.c index 87e3b9a1c..66f9cf2fc 100644 --- a/src/backend.c +++ b/src/backend.c @@ -540,8 +540,7 @@ static struct server *get_server_rnd(struct stream *s, const struct server *avoi curr = NULL; do { prev = curr; - /* ensure all 32 bits are covered as long as RAND_MAX >= 65535 */ - hash = ((uint64_t)ha_random() * ((uint64_t)RAND_MAX + 1)) ^ ha_random(); + hash = ha_random32(); curr = chash_get_server_hash(px, hash, avoid); if (!curr) break;