diff options
author | Garrett Wollman <wollman@FreeBSD.org> | 2001-11-08 22:01:35 +0000 |
---|---|---|
committer | Garrett Wollman <wollman@FreeBSD.org> | 2001-11-08 22:01:35 +0000 |
commit | 07321a183e41d66ec66869b32d7f04091ba75a3b (patch) | |
tree | d5f27783694abe13c0485d7c7ab283120c8325c2 /usr.bin/jot/jot.c | |
parent | f776d8e82bed73343172333c663916ad8f452aa8 (diff) | |
download | src-07321a183e41d66ec66869b32d7f04091ba75a3b.tar.gz src-07321a183e41d66ec66869b32d7f04091ba75a3b.zip |
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.
Notes
Notes:
svn path=/head/; revision=86197
Diffstat (limited to 'usr.bin/jot/jot.c')
-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 ebea7e196e43..1ab2bd9c2d5e 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"); } |