diff options
| author | Mark Adler <fork@madler.net> | 2022-10-06 12:57:31 -0700 |
|---|---|---|
| committer | Mark Adler <fork@madler.net> | 2022-10-06 20:43:18 -0700 |
| commit | 9331fecc10d1409b8f63cbb3cc2365596255d672 (patch) | |
| tree | b8d86f98a2c4b71da5473ded17c8d7646dbc304d | |
| parent | d0704a820186481da35d08f4b655881e1d32089f (diff) | |
| download | zlib-9331fecc10d1409b8f63cbb3cc2365596255d672.tar.gz zlib-9331fecc10d1409b8f63cbb3cc2365596255d672.tar.bz2 zlib-9331fecc10d1409b8f63cbb3cc2365596255d672.zip | |
Remove redundant check in gz_look().
| -rw-r--r-- | gzread.c | 8 |
1 files changed, 3 insertions, 5 deletions
| @@ -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; |
