Fixing clang compilation warning

warning: shifting a negative signed value is undefined [-Wshift-negative-value]
This commit is contained in:
Alexis Green 2016-07-31 22:35:16 -07:00
commit 22e31cd087
2 changed files with 4 additions and 3 deletions

View file

@ -1523,7 +1523,8 @@ z_streamp strm;
{
struct inflate_state FAR *state;
if (strm == Z_NULL || strm->state == Z_NULL) return -1L << 16;
if (strm == Z_NULL || strm->state == Z_NULL)
return (long)(((unsigned long)0 - 1) << 16);
state = (struct inflate_state FAR *)strm->state;
return ((long)(state->back) << 16) +
(state->mode == COPY ? state->length :