diff options
author | Mark Adler <madler@alumni.caltech.edu> | 2016-12-31 08:49:17 -0800 |
---|---|---|
committer | Hans Kristian Rosbach <hk-git@circlestorm.org> | 2017-02-07 10:38:47 +0100 |
commit | cd0071573cb2189ab059c91d1249e5ec4a4df991 (patch) | |
tree | a1586227f5b373ba44a3a48ca4d87c6fb9d88601 /uncompr.c | |
parent | a7edd5a1a6be7cf6ee5f789df09020d323a91ab9 (diff) |
Use a uniform approach for the largest value of an unsigned type.
Diffstat (limited to 'uncompr.c')
-rw-r--r-- | uncompr.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 */ |