]> git.lizzy.rs Git - zlib.git/blobdiff - inflate.c
Use a uniform approach for the largest value of an unsigned type.
[zlib.git] / inflate.c
index 0372edfda762908c9a45335cd6ff734b89e90b21..92e9139a67fe49f270bf6070611d2ecbfd4a76b0 100644 (file)
--- a/inflate.c
+++ b/inflate.c
@@ -1555,7 +1555,7 @@ unsigned long ZEXPORT inflateCodesUsed(strm)
 z_streamp strm;
 {
     struct inflate_state FAR *state;
-    if (inflateStateCheck(strm)) return (unsigned long)0 - 1;
+    if (inflateStateCheck(strm)) return (unsigned long)-1;
     state = (struct inflate_state FAR *)strm->state;
     return (unsigned long)(state->next - state->codes);
 }