mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-17 13:53:39 +00:00
After fixing ranges restore POSIX requirement: rand() call without
srand() must be the same as srand(1); rand(); (yet one increment)
This commit is contained in:
parent
f72b68a1bf
commit
7d815fd551
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=252668
|
@ -99,7 +99,12 @@ rand_r(unsigned int *ctx)
|
|||
}
|
||||
|
||||
|
||||
static u_long next = 1;
|
||||
static u_long next =
|
||||
#ifdef USE_WEAK_SEEDING
|
||||
1;
|
||||
#else
|
||||
2;
|
||||
#endif
|
||||
|
||||
int
|
||||
rand()
|
||||
|
|
Loading…
Reference in a new issue