summaryrefslogtreecommitdiffstats
path: root/games/fortune
diff options
context:
space:
mode:
Diffstat (limited to 'games/fortune')
-rw-r--r--games/fortune/strfile/strfile.c4
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;
OpenPOWER on IntegriCloud