diff options
author | wollman <wollman@FreeBSD.org> | 2001-11-08 22:01:35 +0000 |
---|---|---|
committer | wollman <wollman@FreeBSD.org> | 2001-11-08 22:01:35 +0000 |
commit | e68b7c9ebfaea9db87f57593ad1adb817b5418a3 (patch) | |
tree | d5f27783694abe13c0485d7c7ab283120c8325c2 /usr.bin/jot | |
parent | 243eea3da865ced58b03bd76f7557069f4701c3c (diff) | |
download | FreeBSD-src-e68b7c9ebfaea9db87f57593ad1adb817b5418a3.zip FreeBSD-src-e68b7c9ebfaea9db87f57593ad1adb817b5418a3.tar.gz |
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.
Diffstat (limited to 'usr.bin/jot')
-rw-r--r-- | usr.bin/jot/jot.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/jot/jot.c b/usr.bin/jot/jot.c index ebea7e1..1ab2bd9 100644 --- a/usr.bin/jot/jot.c +++ b/usr.bin/jot/jot.c @@ -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"); } |