diff options
author | ache <ache@FreeBSD.org> | 2008-08-07 20:05:51 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 2008-08-07 20:05:51 +0000 |
commit | e1d97badbcadb707cd9bc1907564c708519655ba (patch) | |
tree | bd0278c09f5637ff3d35efe66b86a9a80edfccec /games | |
parent | 61c55e8d2729f4f029b994743925bdabebdb08e9 (diff) | |
download | FreeBSD-src-e1d97badbcadb707cd9bc1907564c708519655ba.zip FreeBSD-src-e1d97badbcadb707cd9bc1907564c708519655ba.tar.gz |
Use arc4random_uniform(3)
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 790a064..5b7a5e4 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; |