summaryrefslogtreecommitdiffstats
path: root/usr.bin/uudecode
diff options
context:
space:
mode:
authormike <mike@FreeBSD.org>2002-09-11 04:26:09 +0000
committermike <mike@FreeBSD.org>2002-09-11 04:26:09 +0000
commitee94c6be46add94ab66850e64c96b8ce26d10f89 (patch)
tree30d4c3193dca6e8cc39b152b63a224e90ff3848f /usr.bin/uudecode
parent2ded912cbd7199fd85563de5e560b6f9b58f0f16 (diff)
downloadFreeBSD-src-ee94c6be46add94ab66850e64c96b8ce26d10f89.zip
FreeBSD-src-ee94c6be46add94ab66850e64c96b8ce26d10f89.tar.gz
Some uses of the variable n needed to be int, others needed to be
size_t. Add a new variable to cope.
Diffstat (limited to 'usr.bin/uudecode')
-rw-r--r--usr.bin/uudecode/uudecode.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/usr.bin/uudecode/uudecode.c b/usr.bin/uudecode/uudecode.c
index 82be8c0..705ab29 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;
OpenPOWER on IntegriCloud