summaryrefslogtreecommitdiffstats
path: root/usr.bin/jot
diff options
context:
space:
mode:
authordds <dds@FreeBSD.org>2006-11-06 09:15:21 +0000
committerdds <dds@FreeBSD.org>2006-11-06 09:15:21 +0000
commite9549fc27653ea1b3477df4090e58596a0bbfe6c (patch)
treeb218c0b743156006d6520d4a432f20c4ce27dd51 /usr.bin/jot
parent162bf8c18e794048919dfc70c6eb30f5a06d987d (diff)
downloadFreeBSD-src-e9549fc27653ea1b3477df4090e58596a0bbfe6c.zip
FreeBSD-src-e9549fc27653ea1b3477df4090e58596a0bbfe6c.tar.gz
Replace obscure aliases through pointers with plain variables.
MFC after: 2 weeks
Diffstat (limited to 'usr.bin/jot')
-rw-r--r--usr.bin/jot/jot.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/usr.bin/jot/jot.c b/usr.bin/jot/jot.c
index c2b001b..70003cf 100644
--- a/usr.bin/jot/jot.c
+++ b/usr.bin/jot/jot.c
@@ -97,11 +97,8 @@ static void usage(void);
int
main(int argc, char **argv)
{
- double xd, yd;
- long id;
- double *x = &xd;
- double *y = &yd;
- long *i = &id;
+ double x, y;
+ long i;
unsigned int mask = 0;
int n = 0;
int ch;
@@ -259,15 +256,15 @@ main(int argc, char **argv)
if (reps == 0)
infinity = 1;
if (randomize) {
- *x = (ender - begin) * (ender > begin ? 1 : -1);
- for (*i = 1; *i <= reps || infinity; (*i)++) {
- *y = arc4random() / ((double)UINT32_MAX + 1);
- if (putdata(*y * *x + begin, reps - *i))
+ x = (ender - begin) * (ender > begin ? 1 : -1);
+ for (i = 1; i <= reps || infinity; i++) {
+ y = arc4random() / ((double)UINT32_MAX + 1);
+ if (putdata(y * x + begin, reps - i))
errx(1, "range error in conversion");
}
} else
- for (*i = 1, *x = begin; *i <= reps || infinity; (*i)++, *x += s)
- if (putdata(*x, reps - *i))
+ for (i = 1, x = begin; i <= reps || infinity; i++, x += s)
+ if (putdata(x, reps - i))
errx(1, "range error in conversion");
if (!nofinalnl)
putchar('\n');
OpenPOWER on IntegriCloud