]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Check for err == Z_OK is always true in minideflate loops.
authorNathan Moinvaziri <nathan@nathanm.com>
Thu, 30 Dec 2021 04:48:47 +0000 (20:48 -0800)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Fri, 7 Jan 2022 23:08:02 +0000 (00:08 +0100)
test/minideflate.c

index 36c27f9046be3210314282c85cc02a27a810477b..f82cfcc3022e75044e07631cc2367a8c937816da 100644 (file)
@@ -111,7 +111,7 @@ void deflate_params(FILE *fin, FILE *fout, int32_t read_buf_size, int32_t write_
             err = PREFIX(deflate)(&c_stream, Z_FINISH);
             if (err == Z_STREAM_END) break;
             CHECK_ERR(err, "deflate");
-        } while (err == Z_OK);
+        } while (1);
     }
 
     /* Output remaining data in write buffer */
@@ -197,7 +197,7 @@ void inflate_params(FILE *fin, FILE *fout, int32_t read_buf_size, int32_t write_
             err = PREFIX(inflate)(&d_stream, Z_FINISH);
             if (err == Z_STREAM_END) break;
             CHECK_ERR(err, "inflate");
-        } while (err == Z_OK);
+        } while (1);
     }
 
     /* Output remaining data in write buffer */