Use srandomdev
This commit is contained in:
parent
3320fc4786
commit
0ba4030b3d
@ -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 */
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include <signal.h>
|
||||
#include <time.h>
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "macros.h"
|
||||
#include "phantdefs.h"
|
||||
|
@ -367,7 +367,7 @@ initialstate()
|
||||
error(_PATH_VOID);
|
||||
/*NOTREACHED*/
|
||||
|
||||
srandom((unsigned) time((long *) NULL)); /* prime random numbers */
|
||||
srandomdev();
|
||||
}
|
||||
/**/
|
||||
/************************************************************************
|
||||
|
@ -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 */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user