diff options
Diffstat (limited to 'games/phantasia')
-rw-r--r-- | games/phantasia/convert.c | 2 | ||||
-rw-r--r-- | games/phantasia/include.h | 1 | ||||
-rw-r--r-- | games/phantasia/main.c | 2 | ||||
-rw-r--r-- | games/phantasia/setup.c | 3 |
4 files changed, 4 insertions, 4 deletions
diff --git a/games/phantasia/convert.c b/games/phantasia/convert.c index b18c5e9..ace262a 100644 --- a/games/phantasia/convert.c +++ b/games/phantasia/convert.c @@ -56,7 +56,7 @@ FILE *oldcharac, *newcharac; /* to open old and new files */ exit(1); } - srandom((unsigned) time((long *) NULL)); /* prime random numbers */ + srandomdev(); while (fread((char *) &Oldplayer, sizeof(struct oldplayer), 1, oldcharac) == 1) /* read and convert old structures into new */ diff --git a/games/phantasia/include.h b/games/phantasia/include.h index bfaa8a7..812b5a5 100644 --- a/games/phantasia/include.h +++ b/games/phantasia/include.h @@ -9,6 +9,7 @@ #include <signal.h> #include <time.h> #include <errno.h> +#include <stdlib.h> #include "macros.h" #include "phantdefs.h" diff --git a/games/phantasia/main.c b/games/phantasia/main.c index 90ddcba..3ed01dd 100644 --- a/games/phantasia/main.c +++ b/games/phantasia/main.c @@ -367,7 +367,7 @@ initialstate() error(_PATH_VOID); /*NOTREACHED*/ - srandom((unsigned) time((long *) NULL)); /* prime random numbers */ + srandomdev(); } /**/ /************************************************************************ diff --git a/games/phantasia/setup.c b/games/phantasia/setup.c index 330afb0..5caac3d 100644 --- a/games/phantasia/setup.c +++ b/games/phantasia/setup.c @@ -4,7 +4,6 @@ #include "include.h" #include <sys/types.h> #include <sys/stat.h> -#include <stdlib.h> #include <unistd.h> /**/ /************************************************************************ @@ -75,7 +74,7 @@ main(argc, argv) argc -= optind; argv += optind; - srandom((unsigned) time((long *) NULL)); /* prime random numbers */ + srandomdev(); umask(0117); /* only owner can read/write created files */ |