summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gzip.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gzip.c b/src/gzip.c
index 9e8edfa..fbd40ef 100644
--- a/src/gzip.c
+++ b/src/gzip.c
@@ -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: