From: Mark Adler Date: Thu, 6 Oct 2022 19:57:31 +0000 (-0700) Subject: Remove redundant check in gz_look(). X-Git-Tag: 2.0.7~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=261fc21732f40bb9fc1064b32a2a4fd5e4b918d8;p=thirdparty%2Fzlib-ng.git Remove redundant check in gz_look(). --- diff --git a/gzread.c b/gzread.c index c3b3a035..f29371bd 100644 --- a/gzread.c +++ b/gzread.c @@ -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;