mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-05 12:56:08 +00:00
Fix initstate() cast to match Lite2
This commit is contained in:
parent
94fa7afda3
commit
2eaf474aea
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=23970
@ -938,7 +938,7 @@ do_rand(tree)
|
|||||||
NODE *tree;
|
NODE *tree;
|
||||||
{
|
{
|
||||||
if (firstrand) {
|
if (firstrand) {
|
||||||
(void) initstate((unsigned) 1, state, sizeof state);
|
(void) initstate((unsigned long) 1, state, sizeof state);
|
||||||
srandom(1);
|
srandom(1);
|
||||||
firstrand = 0;
|
firstrand = 0;
|
||||||
}
|
}
|
||||||
@ -954,7 +954,7 @@ NODE *tree;
|
|||||||
long ret = save_seed; /* SVR4 awk srand returns previous seed */
|
long ret = save_seed; /* SVR4 awk srand returns previous seed */
|
||||||
|
|
||||||
if (firstrand)
|
if (firstrand)
|
||||||
(void) initstate((unsigned) 1, state, sizeof state);
|
(void) initstate((unsigned long) 1, state, sizeof state);
|
||||||
else
|
else
|
||||||
(void) setstate(state);
|
(void) setstate(state);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user