diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2002-12-06 21:48:53 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2002-12-06 21:48:53 +0000 |
commit | 99f7d832e358aafae4a20e767b7ff31210c4887d (patch) | |
tree | 0d21178d992de6b4ae212bcdf5ad9cef92f9ee18 /games/adventure | |
parent | 9e9e683c581c45c1caca670660c0bb9d1906a95d (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/adventure')
-rw-r--r-- | games/adventure/init.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/games/adventure/init.c b/games/adventure/init.c index 8127e7182dc..2a3dcb13ae5 100644 --- a/games/adventure/init.c +++ b/games/adventure/init.c @@ -1,4 +1,4 @@ -/* $OpenBSD: init.c,v 1.6 1998/08/31 02:29:39 pjanzen Exp $ */ +/* $OpenBSD: init.c,v 1.7 2002/12/06 21:48:50 millert Exp $ */ /* $NetBSD: init.c,v 1.4 1996/05/21 21:53:05 mrg Exp $ */ /*- @@ -43,7 +43,7 @@ #if 0 static char sccsid[] = "@(#)init.c 8.1 (Berkeley) 6/2/93"; #else -static char rcsid[] = "$OpenBSD: init.c,v 1.6 1998/08/31 02:29:39 pjanzen Exp $"; +static char rcsid[] = "$OpenBSD: init.c,v 1.7 2002/12/06 21:48:50 millert Exp $"; #endif #endif /* not lint */ @@ -227,8 +227,7 @@ void startup() { demo = Start(); - srandom((unsigned int)(time((time_t *)NULL))); /* random seed */ - /* srand(371); */ /* non-random seed */ + srandomdev(); hinted[3] = yes(65, 1, 0); newloc = 1; delhit = 0; |