summaryrefslogtreecommitdiffstats
path: root/usr.bin/jot
diff options
context:
space:
mode:
authorgallatin <gallatin@FreeBSD.org>2001-11-08 20:49:24 +0000
committergallatin <gallatin@FreeBSD.org>2001-11-08 20:49:24 +0000
commit243eea3da865ced58b03bd76f7557069f4701c3c (patch)
treea13a645c1dd1fab8530147d0b5bb2b0b2c512698 /usr.bin/jot
parent08792e81f7b1fbeb088bb232448bf9bce38c0f1a (diff)
downloadFreeBSD-src-243eea3da865ced58b03bd76f7557069f4701c3c.zip
FreeBSD-src-243eea3da865ced58b03bd76f7557069f4701c3c.tar.gz
fix jot -r on 64-bit platforms by teaching it that arc4random outputs
an int, not a long Submitted by: Paul Herman <pherman@frenchfries.net> PR#: alpha/31859
Diffstat (limited to 'usr.bin/jot')
-rw-r--r--usr.bin/jot/jot.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/jot/jot.c b/usr.bin/jot/jot.c
index 6a01c22..ebea7e1 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)ULONG_MAX;
+ *y = arc4random() / (double)UINT_MAX;
if (putdata(*y * *x + begin, reps - *i))
errx(1, "range error in conversion");
}
OpenPOWER on IntegriCloud