From: Mark Adler Date: Thu, 6 Oct 2022 19:57:31 +0000 (-0700) Subject: Remove redundant check in gz_look(). X-Git-Tag: 2.1.0-beta1~80 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=33e671b90d2847f27c237de1236a6686620cf926;p=thirdparty%2Fzlib-ng.git Remove redundant check in gz_look(). --- diff --git a/gzread.c.in b/gzread.c.in index c421f9f56..262517e4f 100644 --- a/gzread.c.in +++ b/gzread.c.in @@ -145,11 +145,9 @@ static int gz_look(gz_state *state) { the output buffer is larger than the input buffer, which also assures space for gzungetc() */ state->x.next = state->out; - if (strm->avail_in) { - memcpy(state->x.next, strm->next_in, strm->avail_in); - state->x.have = strm->avail_in; - strm->avail_in = 0; - } + memcpy(state->x.next, strm->next_in, strm->avail_in); + state->x.have = strm->avail_in; + strm->avail_in = 0; state->how = COPY; state->direct = 1; return 0;