There is no sense to use random random() and arc4random() in the same program.
Switch to arc4random() completely.
This commit is contained in:
parent
0f77478694
commit
c6c9094f0c
@ -1058,9 +1058,8 @@ pw_getrand(u_char *buf, int len)
|
||||
{
|
||||
int i;
|
||||
|
||||
srandomdev();
|
||||
for (i = 0; i < len; i++) {
|
||||
unsigned long val = random();
|
||||
unsigned long val = arc4random();
|
||||
/* Use all bits in the random value */
|
||||
buf[i]=(u_char)((val >> 24) ^ (val >> 16) ^ (val >> 8) ^ val);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user