From f878e83f9d1c2f00ca19c23344062b946ac62ecc Mon Sep 17 00:00:00 2001 From: Dima Dorfman Date: Tue, 29 May 2001 23:35:18 +0000 Subject: [PATCH] Replace the cast I removed in rev. 1.16 with a slightly less evil one (well, at least one that gcc doesn't complain about). This fixes -r, which rev. 1.16 broke. Submitted by: bde --- usr.bin/jot/jot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/jot/jot.c b/usr.bin/jot/jot.c index 5a7ce25e9d12..6a01c228467f 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() / ULONG_MAX; + *y = arc4random() / (double)ULONG_MAX; if (putdata(*y * *x + begin, reps - *i)) errx(1, "range error in conversion"); }