aboutsummaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>2005-07-23 18:24:47 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>2005-07-23 18:24:47 +0000
commitf92c1adc15fab7522a6300a9fb73254b8694e58e (patch)
treef21ae32a09b2218ab90657c8bad27eb3dd18fb12 /games
parent8fa523fb955dd48958d5a02734d6b5b1c13bc182 (diff)
downloadsrc-f92c1adc15fab7522a6300a9fb73254b8694e58e.tar.gz
src-f92c1adc15fab7522a6300a9fb73254b8694e58e.zip
My change, namely srandomdev() addition, was backed out even without
discussing with me, and I obviously disagree seeing that afterwards (srandomdev() back out not fix any thing, it can only mask the problem). So, back out the back out and return srandomdev(). People who have problems with repeated quotes should use -D fortune option for debugging to see is the problem in (1) /dev/random initialization or in (2) fortune code itself. I will be glad to help, but I can't reproduce repeated quote situation on my machine. In either case found, (1) or (2) should be fixed instead of removing srandomdev().
Notes
Notes: svn path=/head/; revision=148349
Diffstat (limited to 'games')
-rw-r--r--games/fortune/fortune/fortune.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/games/fortune/fortune/fortune.c b/games/fortune/fortune/fortune.c
index 60e6cbc7f127..a7a8f452e612 100644
--- a/games/fortune/fortune/fortune.c
+++ b/games/fortune/fortune/fortune.c
@@ -174,7 +174,6 @@ char *av[];
#ifdef OK_TO_WRITE_DISK
int fd;
#endif /* OK_TO_WRITE_DISK */
- struct timeval now;
(void) setlocale(LC_ALL, "");
@@ -184,8 +183,7 @@ char *av[];
exit(find_matches() != 0);
init_prob();
- gettimeofday(&now, NULL);
- srandom(now.tv_usec);
+ srandomdev();
do {
get_fort();
} while ((Short_only && fortlen() > SLEN) ||