summaryrefslogtreecommitdiff
path: root/inflate.c
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2016-12-31 08:49:17 -0800
committerHans Kristian Rosbach <hk-git@circlestorm.org>2017-02-07 10:38:47 +0100
commitcd0071573cb2189ab059c91d1249e5ec4a4df991 (patch)
treea1586227f5b373ba44a3a48ca4d87c6fb9d88601 /inflate.c
parenta7edd5a1a6be7cf6ee5f789df09020d323a91ab9 (diff)
Use a uniform approach for the largest value of an unsigned type.
Diffstat (limited to 'inflate.c')
-rw-r--r--inflate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/inflate.c b/inflate.c
index 298479f..0f7e3e7 100644
--- a/inflate.c
+++ b/inflate.c
@@ -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);
}