mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-28 11:57:28 +00:00
Use arc4random_uniform(3)
This commit is contained in:
parent
921651bdd3
commit
68910e7a67
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=181397
@ -411,7 +411,7 @@ mkfifotemp(char *template)
|
||||
* them with random characters until there are no more 'X'.
|
||||
*/
|
||||
while (ptr >= template && *ptr == 'X') {
|
||||
uint32_t rand_num = arc4random() % (sizeof(padchar) - 1);
|
||||
uint32_t rand_num = arc4random_uniform(sizeof(padchar) - 1);
|
||||
*ptr-- = padchar[rand_num];
|
||||
}
|
||||
start = ptr + 1;
|
||||
|
Loading…
Reference in New Issue
Block a user