try to get rid of some warnings on hpux

This commit is contained in:
Bill Hoffman 2009-11-08 17:39:39 -05:00
parent f5ff79e8bd
commit 739d692e72
2 changed files with 6 additions and 6 deletions

View File

@ -1160,7 +1160,7 @@ mtree_atol10(char **p)
digit = **p - '0';
while (digit >= 0 && digit < base) {
if (l > limit || (l == limit && digit > last_digit_limit)) {
l = UINT64_MAX; /* Truncate on overflow. */
l = INT64_MAX; /* Truncate on overflow. */
break;
}
l = (l * base) + digit;
@ -1201,7 +1201,7 @@ mtree_atol16(char **p)
digit = -1;
while (digit >= 0 && digit < base) {
if (l > limit || (l == limit && digit > last_digit_limit)) {
l = UINT64_MAX; /* Truncate on overflow. */
l = INT64_MAX; /* Truncate on overflow. */
break;
}
l = (l * base) + digit;

View File

@ -1634,7 +1634,7 @@ pax_time(const char *p, int64_t *ps, long *pn)
digit = *p - '0';
if (s > limit ||
(s == limit && digit > last_digit_limit)) {
s = UINT64_MAX;
s = INT64_MAX;
break;
}
s = (s * 10) + digit;
@ -1933,7 +1933,7 @@ gnu_sparse_10_atol(struct archive_read *a, struct tar *tar,
return (ARCHIVE_WARN);
digit = *p - '0';
if (l > limit || (l == limit && digit > last_digit_limit))
l = UINT64_MAX; /* Truncate on overflow. */
l = INT64_MAX; /* Truncate on overflow. */
else
l = (l * base) + digit;
p++;
@ -2039,7 +2039,7 @@ tar_atol8(const char *p, unsigned char_cnt)
digit = *p - '0';
while (digit >= 0 && digit < base && char_cnt-- > 0) {
if (l>limit || (l == limit && digit > last_digit_limit)) {
l = UINT64_MAX; /* Truncate on overflow. */
l = INT64_MAX; /* Truncate on overflow. */
break;
}
l = (l * base) + digit;
@ -2075,7 +2075,7 @@ tar_atol10(const char *p, unsigned char_cnt)
digit = *p - '0';
while (digit >= 0 && digit < base && char_cnt-- > 0) {
if (l > limit || (l == limit && digit > last_digit_limit)) {
l = UINT64_MAX; /* Truncate on overflow. */
l = INT64_MAX; /* Truncate on overflow. */
break;
}
l = (l * base) + digit;