Actually, arc4random() returns a uint32_t, not an int. Use the correct

constant, just in case uint32_t turns into a `short' ten years from now.
If this is MFC'd it will be necessary to hard-code the constant since
-stable doesn't have UINT32_MAX.
This commit is contained in:
Garrett Wollman 2001-11-08 22:01:35 +00:00
parent f776d8e82b
commit 07321a183e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=86197

View File

@ -277,7 +277,7 @@ main(argc, argv)
if (randomize) {
*x = (ender - begin) * (ender > begin ? 1 : -1);
for (*i = 1; *i <= reps || infinity; (*i)++) {
*y = arc4random() / (double)UINT_MAX;
*y = arc4random() / (double)UINT32_MAX;
if (putdata(*y * *x + begin, reps - *i))
errx(1, "range error in conversion");
}