summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorMike Pechkin <mpech@cvs.openbsd.org>2002-02-19 18:57:43 +0000
committerMike Pechkin <mpech@cvs.openbsd.org>2002-02-19 18:57:43 +0000
commit30b42b4f7ca01a49df109d21f0338a4aaa395791 (patch)
tree4b4167d14b299a202527fe046d84452542cd456e /usr.sbin
parent1b7ac57ccea5e902a5153d8337c8476912eba485 (diff)
Use arc4random().
millert@ ok
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/timed/timed/timed.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/usr.sbin/timed/timed/timed.c b/usr.sbin/timed/timed/timed.c
index 6a78ff01011..bd8f9fee141 100644
--- a/usr.sbin/timed/timed/timed.c
+++ b/usr.sbin/timed/timed/timed.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: timed.c,v 1.12 2002/02/19 18:38:02 mpech Exp $ */
+/* $OpenBSD: timed.c,v 1.13 2002/02/19 18:57:42 mpech Exp $ */
/*-
* Copyright (c) 1985, 1993 The Regents of the University of California.
@@ -44,7 +44,7 @@ static char sccsid[] = "@(#)timed.c 5.1 (Berkeley) 5/11/93";
#endif /* not lint */
#ifdef sgi
-#ident "$Revision: 1.12 $"
+#ident "$Revision: 1.13 $"
#endif /* sgi */
#define TSPTYPES
@@ -351,9 +351,8 @@ main(int argc, char **argv)
/* choose a unique seed for random number generation */
(void)gettimeofday(&ntime, 0);
- srandom(ntime.tv_sec + ntime.tv_usec);
- sequence = random(); /* initial seq number */
+ sequence = arc4random(); /* initial seq number */
#ifndef sgi
/* rounds kernel variable time to multiple of 5 ms. */