]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
fixed zlib test 4243/head
authorYann Collet <cyan@fb.com>
Thu, 16 Jan 2025 00:31:00 +0000 (16:31 -0800)
committerYann Collet <cyan@fb.com>
Thu, 16 Jan 2025 00:31:00 +0000 (16:31 -0800)
new versions of the library generate a different error code

zlibWrapper/examples/example.c

index 99fbf5b1953f6a73d888bef33b3dd8a87ff9d6a2..eaae69747b7678919c152ad8bbb8c38671eab6dc 100644 (file)
@@ -340,7 +340,7 @@ void test_large_deflate(Byte *compr, uLong comprLen, Byte *uncompr,
 
 /* ===========================================================================
  * Test inflate() with large buffers
- */ 
+ */
 void test_large_inflate(Byte *compr, uLong comprLen, Byte *uncompr,
                         uLong uncomprLen) {
     int err;
@@ -442,8 +442,8 @@ void test_sync(Byte *compr, uLong comprLen, Byte *uncompr, uLong uncomprLen) {
     CHECK_ERR(err, "inflateSync");
 
     err = inflate(&d_stream, Z_FINISH);
-    if (err != Z_DATA_ERROR) {
-        fprintf(stderr, "inflate should report DATA_ERROR\n");
+    if (err != Z_STREAM_END) {
+        fprintf(stderr, "inflate reported %i != %i (Z_STREAM_END)\n", err, Z_STREAM_END);
         /* Because of incorrect adler32 */
         exit(1);
     }