Add a fast non-cryptographic PRNG.
This commit is contained in:
parent
c6dd5b239f
commit
3e49337d9a
10 changed files with 107 additions and 20 deletions
|
@ -173,7 +173,7 @@ void Http::Request::main()
|
|||
addrList->sort();
|
||||
addrList->unique();
|
||||
unsigned int i = 0,k = 0;
|
||||
k = Utils::randomInt<unsigned int>() % addrList->size();
|
||||
k = _r->prng.next32() % addrList->size();
|
||||
std::list<InetAddress>::iterator a(addrList->begin());
|
||||
while (i++ != k) ++a;
|
||||
addr = &(*a);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue