aboutsummaryrefslogtreecommitdiff
path: root/gzread.c
diff options
context:
space:
mode:
authorMark Adler <fork@madler.net>2022-10-06 12:57:31 -0700
committerMark Adler <fork@madler.net>2022-10-06 20:43:18 -0700
commit9331fecc10d1409b8f63cbb3cc2365596255d672 (patch)
treeb8d86f98a2c4b71da5473ded17c8d7646dbc304d /gzread.c
parentd0704a820186481da35d08f4b655881e1d32089f (diff)
downloadzlib-9331fecc10d1409b8f63cbb3cc2365596255d672.tar.gz
zlib-9331fecc10d1409b8f63cbb3cc2365596255d672.tar.bz2
zlib-9331fecc10d1409b8f63cbb3cc2365596255d672.zip
Remove redundant check in gz_look().
Diffstat (limited to 'gzread.c')
-rw-r--r--gzread.c8
1 files 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)
157 the output buffer is larger than the input buffer, which also assures 157 the output buffer is larger than the input buffer, which also assures
158 space for gzungetc() */ 158 space for gzungetc() */
159 state->x.next = state->out; 159 state->x.next = state->out;
160 if (strm->avail_in) { 160 memcpy(state->x.next, strm->next_in, strm->avail_in);
161 memcpy(state->x.next, strm->next_in, strm->avail_in); 161 state->x.have = strm->avail_in;
162 state->x.have = strm->avail_in; 162 strm->avail_in = 0;
163 strm->avail_in = 0;
164 }
165 state->how = COPY; 163 state->how = COPY;
166 state->direct = 1; 164 state->direct = 1;
167 return 0; 165 return 0;