summaryrefslogtreecommitdiff
path: root/games/bs
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2002-12-06 21:48:53 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2002-12-06 21:48:53 +0000
commit99f7d832e358aafae4a20e767b7ff31210c4887d (patch)
tree0d21178d992de6b4ae212bcdf5ad9cef92f9ee18 /games/bs
parent9e9e683c581c45c1caca670660c0bb9d1906a95d (diff)
Replace things like srandom(time(NULL)) with srandomdev(3). random(3)
good enough for games but we should at least use a decent seed. pjanzen@ OK
Diffstat (limited to 'games/bs')
-rw-r--r--games/bs/bs.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/games/bs/bs.c b/games/bs/bs.c
index 7e0e4b4ec46..cb3fc962a4b 100644
--- a/games/bs/bs.c
+++ b/games/bs/bs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bs.c,v 1.17 2002/08/09 09:54:30 pjanzen Exp $ */
+/* $OpenBSD: bs.c,v 1.18 2002/12/06 21:48:51 millert Exp $ */
/*
* bs.c - original author: Bruce Holloway
* salvo option by: Chuck A DeGaul
@@ -11,7 +11,7 @@
*/
#ifndef lint
-static const char rcsid[] = "$OpenBSD: bs.c,v 1.17 2002/08/09 09:54:30 pjanzen Exp $";
+static const char rcsid[] = "$OpenBSD: bs.c,v 1.18 2002/12/06 21:48:51 millert Exp $";
#endif
/* #define _POSIX_SOURCE */ /* ( random() ) */
@@ -219,7 +219,7 @@ static void intro(void)
{
char *tmpname;
- srandom((unsigned)(time(0L)+getpid())); /* Kick the random number generator */
+ srandomdev(); /* Kick the random number generator */
(void) signal(SIGINT,uninitgame);
(void) signal(SIGINT,uninitgame);