Encapsulate direct use of random(), srandom() in chance.c
Wrap roll0() around random(), and seed_prng() around srandom(). In preparation of replacing the PRNG.
This commit is contained in:
parent
8eb78a5a80
commit
866859e912
17 changed files with 87 additions and 49 deletions
|
@ -50,6 +50,7 @@
|
|||
#include "sys/socket.h"
|
||||
#endif
|
||||
|
||||
#include "chance.h"
|
||||
#include "empio.h"
|
||||
#include "empthread.h"
|
||||
#include "file.h"
|
||||
|
@ -349,7 +350,7 @@ crash_dump(void)
|
|||
static void
|
||||
init_server(unsigned seed, int force_bad_state)
|
||||
{
|
||||
srandom(seed);
|
||||
seed_prng(seed);
|
||||
#if defined(_WIN32)
|
||||
loc_NTInit();
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue