diff options
| -rw-r--r-- | compress.c | 2 | ||||
| -rw-r--r-- | inflate.c | 2 | ||||
| -rw-r--r-- | uncompr.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/compress.c b/compress.c index 1fba057011..d4f99bb31a 100644 --- a/compress.c +++ b/compress.c @@ -23,7 +23,7 @@ int ZEXPORT compress2(unsigned char *dest, size_t *destLen, const unsigned char size_t sourceLen, int level) { z_stream stream; int err; - const unsigned int max = (unsigned int)0 - 1; + const unsigned int max = (unsigned int)-1; size_t left; left = *destLen; @@ -1496,7 +1496,7 @@ long ZEXPORT inflateMark(z_stream *strm) { unsigned long ZEXPORT inflateCodesUsed(z_stream *strm) { struct inflate_state *state; if (strm == NULL || strm->state == NULL) - return (unsigned long)0 - 1; + return (unsigned long)-1; state = (struct inflate_state *)strm->state; return (unsigned long)(state->next - state->codes); } @@ -27,7 +27,7 @@ int ZEXPORT uncompress2(unsigned char *dest, size_t *destLen, const unsigned char *source, size_t *sourceLen) { z_stream stream; int err; - const unsigned int max = (unsigned int)0 - 1; + const unsigned int max = (unsigned int)-1; size_t len, left; unsigned char buf[1]; /* for detection of incomplete stream when *destLen == 0 */ |
