Use a uniform approach for the largest value of an unsigned type.

This commit is contained in:
Mark Adler
2016-12-31 08:49:17 -08:00
parent f3fcb92cf6
commit b7fbee2156
3 changed files with 3 additions and 3 deletions

View File

@@ -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);
}