Use srandomdev

This commit is contained in:
Andrey A. Chernov 1997-09-24 05:28:05 +00:00
parent 3320fc4786
commit 0ba4030b3d
4 changed files with 4 additions and 4 deletions

View File

@ -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 */

View File

@ -9,6 +9,7 @@
#include <signal.h>
#include <time.h>
#include <errno.h>
#include <stdlib.h>
#include "macros.h"
#include "phantdefs.h"

View File

@ -367,7 +367,7 @@ initialstate()
error(_PATH_VOID);
/*NOTREACHED*/
srandom((unsigned) time((long *) NULL)); /* prime random numbers */
srandomdev();
}
/* */
/************************************************************************

View File

@ -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 */