diff options
author | Mike Barcroft <mike@FreeBSD.org> | 2002-09-11 04:26:09 +0000 |
---|---|---|
committer | Mike Barcroft <mike@FreeBSD.org> | 2002-09-11 04:26:09 +0000 |
commit | 1494fdadfbafd3dee56807e129220f058983fcc7 (patch) | |
tree | 30d4c3193dca6e8cc39b152b63a224e90ff3848f /usr.bin | |
parent | 74014b7f0acd542fb53e64bc8cfb8f5ce3d48499 (diff) | |
download | src-1494fdadfbafd3dee56807e129220f058983fcc7.tar.gz src-1494fdadfbafd3dee56807e129220f058983fcc7.zip |
Some uses of the variable n needed to be int, others needed to be
size_t. Add a new variable to cope.
Notes
Notes:
svn path=/head/; revision=103210
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/uudecode/uudecode.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/usr.bin/uudecode/uudecode.c b/usr.bin/uudecode/uudecode.c index 82be8c015351..705ab29d5a3a 100644 --- a/usr.bin/uudecode/uudecode.c +++ b/usr.bin/uudecode/uudecode.c @@ -152,7 +152,7 @@ decode(void) int decode2(void) { - int base64; + int base64, i; size_t n; char ch, *p, *q; void *mode; @@ -261,13 +261,13 @@ decode2(void) } while (0) /* - * `n' is used to avoid writing out all the characters + * `i' is used to avoid writing out all the characters * at the end of the file. */ - if ((n = DEC(*p)) <= 0) + if ((i = DEC(*p)) <= 0) break; - for (++p; n > 0; p += 4, n -= 3) - if (n >= 3) { + for (++p; i > 0; p += 4, i -= 3) + if (i >= 3) { if (!(IS_DEC(*p) && IS_DEC(*(p + 1)) && IS_DEC(*(p + 2)) && IS_DEC(*(p + 3)))) OUT_OF_RANGE; @@ -280,13 +280,13 @@ decode2(void) putchar(ch); } else { - if (n >= 1) { + if (i >= 1) { if (!(IS_DEC(*p) && IS_DEC(*(p + 1)))) OUT_OF_RANGE; ch = DEC(p[0]) << 2 | DEC(p[1]) >> 4; putchar(ch); } - if (n >= 2) { + if (i >= 2) { if (!(IS_DEC(*(p + 1)) && IS_DEC(*(p + 2)))) OUT_OF_RANGE; @@ -294,7 +294,7 @@ decode2(void) ch = DEC(p[1]) << 4 | DEC(p[2]) >> 2; putchar(ch); } - if (n >= 3) { + if (i >= 3) { if (!(IS_DEC(*(p + 2)) && IS_DEC(*(p + 3)))) OUT_OF_RANGE; |