From 9331fecc10d1409b8f63cbb3cc2365596255d672 Mon Sep 17 00:00:00 2001 From: Mark Adler Date: Thu, 6 Oct 2022 12:57:31 -0700 Subject: Remove redundant check in gz_look(). --- gzread.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/gzread.c b/gzread.c index 884c9bf..dd77381 100644 --- a/gzread.c +++ b/gzread.c @@ -157,11 +157,9 @@ local int gz_look(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; -- cgit v1.2.1