MINOR: checks: use the lighter PRNG for spread checks
There's no point using ha_random32() which is heavy and uses shared
variables to calculate a random timer when we have statistical_prng()
which does the same and was made exactly for this.
diff --git a/src/check.c b/src/check.c
index 5a6ee08..34791dd 100644
--- a/src/check.c
+++ b/src/check.c
@@ -1226,7 +1226,7 @@
rv = 0;
if (global.spread_checks > 0) {
rv = srv_getinter(check) * global.spread_checks / 100;
- rv -= (int) (2 * rv * (ha_random32() / 4294967295.0));
+ rv -= (int) (2 * rv * (statistical_prng() / 4294967295.0));
}
t->expire = tick_add(now_ms, MS_TO_TICKS(srv_getinter(check) + rv));
}
diff --git a/src/extcheck.c b/src/extcheck.c
index 2093b40..0fd35a1 100644
--- a/src/extcheck.c
+++ b/src/extcheck.c
@@ -596,7 +596,7 @@
rv = 0;
if (global.spread_checks > 0) {
rv = srv_getinter(check) * global.spread_checks / 100;
- rv -= (int) (2 * rv * (ha_random32() / 4294967295.0));
+ rv -= (int) (2 * rv * (statistical_prng() / 4294967295.0));
}
t->expire = tick_add(now_ms, MS_TO_TICKS(srv_getinter(check) + rv));
}