diff options
author | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2023-04-30 03:58:24 (EDT) |
---|---|---|
committer | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2023-04-30 04:13:42 (EDT) |
commit | 5e7ab29517bd7d599ef687353ca2422d0061a517 (patch) | |
tree | 9578ecc4a1ec1de00b42caa0206f0a757059e6cf /src | |
parent | dc25a788d874d9ee95738b9fa56d2a06f6a31141 (diff) |
gzip: Fix write buffer
Diffstat (limited to 'src')
-rw-r--r-- | src/gzip.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -187,6 +187,8 @@ opkg_opk_gzip_write(struct opkg_opk_gzip *gzip, void *record, size_t size, gzip->stream.avail_in = size; do { + gzip->stream.next_out = gzip->buffer; + gzip->stream.avail_out = gzip->buffer_size; switch (deflate(&gzip->stream, (last > 0 ? Z_FINISH : Z_NO_FLUSH))) { case Z_OK: @@ -201,8 +203,6 @@ opkg_opk_gzip_write(struct opkg_opk_gzip *gzip, void *record, size_t size, gzip->buffer_size - gzip->stream.avail_out)) { case OPKG_OPK_OK: - gzip->stream.next_out = gzip->buffer; - gzip->stream.avail_out = gzip->buffer_size; break; case OPKG_OPK_END: case OPKG_OPK_ERROR: |