summaryrefslogtreecommitdiff
path: root/usr.sbin/ntpd/ntp.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/ntpd/ntp.c')
-rw-r--r--usr.sbin/ntpd/ntp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/ntpd/ntp.c b/usr.sbin/ntpd/ntp.c
index 28234875813..7026a9ba548 100644
--- a/usr.sbin/ntpd/ntp.c
+++ b/usr.sbin/ntpd/ntp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ntp.c,v 1.103 2008/01/28 11:45:59 mpf Exp $ */
+/* $OpenBSD: ntp.c,v 1.104 2008/04/13 00:22:17 djm Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -659,7 +659,7 @@ scale_interval(time_t requested)
time_t interval, r;
interval = requested * conf->scale;
- r = arc4random() % MAX(5, interval / 10);
+ r = arc4random_uniform(MAX(5, interval / 10));
return (interval + r);
}
@@ -669,7 +669,7 @@ error_interval(void)
time_t interval, r;
interval = INTERVAL_QUERY_PATHETIC * QSCALE_OFF_MAX / QSCALE_OFF_MIN;
- r = arc4random() % (interval / 10);
+ r = arc4random_uniform(interval / 10);
return (interval + r);
}