summaryrefslogtreecommitdiff
path: root/uncompr.c
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2016-12-31 08:49:17 -0800
committerMark Adler <madler@alumni.caltech.edu>2016-12-31 08:49:17 -0800
commitb7fbee215674c3399212dffba1e71323056931d9 (patch)
tree4bbc5237bdd56b65dc4fb3f49bac359cec26f9cc /uncompr.c
parentf3fcb92cf6c81b3ecd04b3ceb9243548b80c0cd9 (diff)
downloadzlib-b7fbee215674c3399212dffba1e71323056931d9.tar.gz
Use a uniform approach for the largest value of an unsigned type.
Diffstat (limited to 'uncompr.c')
-rw-r--r--uncompr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/uncompr.c b/uncompr.c
index 2fbfcc0..f03a1a8 100644
--- a/uncompr.c
+++ b/uncompr.c
@@ -32,7 +32,7 @@ int ZEXPORT uncompress2 (dest, destLen, source, sourceLen)
{
z_stream stream;
int err;
- const uInt max = (uInt)0 - 1;
+ const uInt max = (uInt)-1;
uLong len, left;
Byte buf[1]; /* for detection of incomplete stream when *destLen == 0 */