diff options
author | Andrey A. Chernov <ache@FreeBSD.org> | 2008-08-07 20:05:51 +0000 |
---|---|---|
committer | Andrey A. Chernov <ache@FreeBSD.org> | 2008-08-07 20:05:51 +0000 |
commit | dc5fe8845b41208ab7824f132d5b2e124e380b9b (patch) | |
tree | bd0278c09f5637ff3d35efe66b86a9a80edfccec /games | |
parent | 808463a45fc184902527ae281b8578d89eaf7a95 (diff) | |
download | src-dc5fe8845b41208ab7824f132d5b2e124e380b9b.tar.gz src-dc5fe8845b41208ab7824f132d5b2e124e380b9b.zip |
Use arc4random_uniform(3)
Notes
Notes:
svn path=/head/; revision=181386
Diffstat (limited to 'games')
-rw-r--r-- | games/fortune/strfile/strfile.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/games/fortune/strfile/strfile.c b/games/fortune/strfile/strfile.c index 790a064c46c0..5b7a5e4ea8df 100644 --- a/games/fortune/strfile/strfile.c +++ b/games/fortune/strfile/strfile.c @@ -447,8 +447,6 @@ void randomize() off_t tmp; off_t *sp; - srandomdev(); - Tbl.str_flags |= STR_RANDOM; cnt = Tbl.str_numstr; @@ -457,7 +455,7 @@ void randomize() */ for (sp = Seekpts; cnt > 0; cnt--, sp++) { - i = random() % cnt; + i = arc4random_uniform(cnt); tmp = sp[0]; sp[0] = sp[i]; sp[i] = tmp; |