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:
Jason S. Ninneman 2017-05-30 11:06:53 -07:00
parent dfe04a58b6
commit 71fcc814f8

3
main.c
View file

@ -110,7 +110,8 @@ int main(int argc, char *argv[]) {
lcgstate.a = 1093; lcgstate.a = 1093;
lcgstate.c = 221587; lcgstate.c = 221587;
lcgstate.m = 1048576; lcgstate.m = 1048576;
long seedval = (long)time(NULL); srand(time(NULL));
long seedval = (long)rand();
set_seed(seedval); set_seed(seedval);
/* Read the database if we have not yet done so */ /* Read the database if we have not yet done so */