Launder seed generation through rand() to ensure seed diversity.
This doesn't affect reproducibility because a) the seed value written to logs is the output of this process, and b) the argument to the seed command *doesn't* get laundered.
This commit is contained in:
parent
01004f1f62
commit
b77e14a6ae
1 changed files with 2 additions and 1 deletions
3
main.c
3
main.c
|
@ -110,7 +110,8 @@ int main(int argc, char *argv[]) {
|
|||
lcgstate.a = 1093;
|
||||
lcgstate.c = 221587;
|
||||
lcgstate.m = 1048576;
|
||||
long seedval = (long)time(NULL);
|
||||
srand(time(NULL));
|
||||
long seedval = (long)rand();
|
||||
set_seed(seedval);
|
||||
|
||||
/* Read the database if we have not yet done so */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue