From: Wayne Davison Date: Mon, 26 Mar 2018 02:07:22 +0000 (-0700) Subject: Avoid a compiler error/warning about shifting a negative value. X-Git-Tag: v3.2.0pre1~232 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eec6ab7615535e02cfcb691d44575268bdcf656f;p=thirdparty%2Frsync.git Avoid a compiler error/warning about shifting a negative value. Fixes bug #13268. --- diff --git a/NEWS b/NEWS index 4fe6d9cb..792df231 100644 --- a/NEWS +++ b/NEWS @@ -4,7 +4,8 @@ Changes since 3.1.3: BUG FIXES: - - ... + - Fix a compiler error/warning about shifting a negative value (in the zlib + code). ENHANCEMENTS: diff --git a/zlib/inflate.c b/zlib/inflate.c index a7555738..cea8e7e4 100644 --- a/zlib/inflate.c +++ b/zlib/inflate.c @@ -1525,7 +1525,7 @@ 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 -(1L << 16); state = (struct inflate_state FAR *)strm->state; return ((long)(state->back) << 16) + (state->mode == COPY ? state->length :