Use more portable random seed generation.
The new function md_random_seed() has replaced time() + getpid() and similar methods. Putting everything in mdport.c slightly reduces the warnings and workarounds.
This commit is contained in:
parent
c194ec3dc9
commit
62047972cc
29 changed files with 123 additions and 81 deletions
|
|
@ -73,7 +73,7 @@ new_level(void)
|
|||
if (i++ > 100)
|
||||
{
|
||||
i = 0;
|
||||
srand(getpid() + (int) time((time_t *) NULL));
|
||||
srand(md_random_seed());
|
||||
}
|
||||
} until (_level[index] == FLOOR);
|
||||
_level[index] = STAIRS;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue