]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Remove redundant setting of allJobsCompleted to 1 4394/head
authorRose <gfunni234@gmail.com>
Mon, 26 May 2025 19:56:55 +0000 (15:56 -0400)
committerRose <gfunni234@gmail.com>
Tue, 24 Jun 2025 18:04:21 +0000 (14:04 -0400)
This will do it automatically.

lib/compress/zstdmt_compress.c

index 0f1fe6d74697f879c328bd3bb9283e890a4152df..6d6f8139bec36afd2f08d991dc6c0f4945fe3534 100644 (file)
@@ -1268,8 +1268,7 @@ size_t ZSTDMT_initCStream_internal(
 
     if (mtctx->allJobsCompleted == 0) {   /* previous compression not correctly finished */
         ZSTDMT_waitForAllJobsCompleted(mtctx);
-        ZSTDMT_releaseAllJobResources(mtctx);
-        mtctx->allJobsCompleted = 1;
+        ZSTDMT_releaseAllJobResources(mtctx); /* Will set allJobsCompleted to 1 */
     }
 
     mtctx->params = params;