aboutsummaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorPedro F. Giffuni <pfg@FreeBSD.org>2016-05-15 06:06:22 +0000
committerPedro F. Giffuni <pfg@FreeBSD.org>2016-05-15 06:06:22 +0000
commitbdfd68dca7911a1a6d94a4479c952df15e489dbc (patch)
treebaa3a491e472d051dbed020ba4dd50840c540372 /sbin
parent73ffff5f64c21f8fa17dc8cf40419e2ecb401c62 (diff)
Notes
Diffstat (limited to 'sbin')
-rw-r--r--sbin/routed/main.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/sbin/routed/main.c b/sbin/routed/main.c
index a6202fb7fcfa..4a8d3ca547f6 100644
--- a/sbin/routed/main.c
+++ b/sbin/routed/main.c
@@ -303,11 +303,6 @@ usage:
pidfile(0);
#endif
mypid = getpid();
-#ifdef __FreeBSD__
- srandomdev();
-#else
- srandom((int)(clk.tv_sec ^ clk.tv_usec ^ mypid));
-#endif
/* prepare socket connected to the kernel.
*/
@@ -826,8 +821,8 @@ intvl_random(struct timeval *tp, /* put value here */
{
tp->tv_sec = (time_t)(hi == lo
? lo
- : (lo + arc4random() % ((hi - lo))));
- tp->tv_usec = arc4random() % 1000000;
+ : (lo + arc4random_uniform(1 + hi - lo)));
+ tp->tv_usec = arc4random_uniform(1000000);
}