lkml.org 
[lkml]   [2023]   [Jan]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 4/8] lib/zlib: Fix DFLTCC ignoring flush modes when avail_in == 0
Date
This commit is based on:
https://github.com/zlib-ng/zlib-ng/commit/40acb3f

Signed-off-by: Mikhail Zaslonko <zaslonko@linux.ibm.com>
Acked-by: Ilya Leoshkevich <iii@linux.ibm.com>
---
lib/zlib_dfltcc/dfltcc_deflate.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/zlib_dfltcc/dfltcc_deflate.c b/lib/zlib_dfltcc/dfltcc_deflate.c
index dc85ec890163..211d344710d5 100644
--- a/lib/zlib_dfltcc/dfltcc_deflate.c
+++ b/lib/zlib_dfltcc/dfltcc_deflate.c
@@ -142,7 +142,8 @@ int dfltcc_deflate(
/* Clear history. */
if (flush == Z_FULL_FLUSH)
param->hl = 0;
- *result = need_more;
+ /* Trigger block post-processing if necessary. */
+ *result = no_flush ? need_more : block_done;
return 1;
}

--
2.34.1
\
 
 \ /
  Last update: 2023-03-26 23:56    [W:0.056 / U:0.408 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site