summaryrefslogtreecommitdiffstats
path: root/games/hangman/setup.c
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1997-09-24 23:00:29 +0000
committerache <ache@FreeBSD.org>1997-09-24 23:00:29 +0000
commitf9b741be26e67350ab1e15d6015911fc92a5d03b (patch)
treea17255a0bbfee2f5495ac7c78c4141ad15ca0516 /games/hangman/setup.c
parent0465821611c95ad45351ff6f5c46ece8accf952e (diff)
downloadFreeBSD-src-f9b741be26e67350ab1e15d6015911fc92a5d03b.zip
FreeBSD-src-f9b741be26e67350ab1e15d6015911fc92a5d03b.tar.gz
Convert to random() and automatically fix bug with RAND_MAX is too large
Diffstat (limited to 'games/hangman/setup.c')
-rw-r--r--games/hangman/setup.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/games/hangman/setup.c b/games/hangman/setup.c
index d82e747..d1c6016 100644
--- a/games/hangman/setup.c
+++ b/games/hangman/setup.c
@@ -35,6 +35,7 @@
static char sccsid[] = "@(#)setup.c 8.1 (Berkeley) 5/31/93";
#endif /* not lint */
+# include <stdlib.h>
# include "hangman.h"
/*
@@ -61,7 +62,7 @@ setup()
addstr(*sp);
}
- srand(time(NULL) + getpid());
+ srandomdev();
if ((Dict = fopen(_PATH_DICT, "r")) == NULL) {
perror(_PATH_DICT);
endwin();
OpenPOWER on IntegriCloud