]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
converting to if
authorBimba Shrestha <bimbashrestha@fb.com>
Fri, 3 Apr 2020 21:21:24 +0000 (14:21 -0700)
committerBimba Shrestha <bimbashrestha@fb.com>
Fri, 3 Apr 2020 21:21:24 +0000 (14:21 -0700)
lib/decompress/zstd_decompress.c

index 7ab2baf316334fc3f4d1365465b53e11877ebaca..c3690f022a13955cd70c6ee1788b7caa523a90c2 100644 (file)
@@ -1515,7 +1515,10 @@ static int ZSTD_DCtx_isOverflow(ZSTD_DStream* zds, size_t const neededInBuffSize
 
 static void ZSTD_DCtx_updateOversizedDuration(ZSTD_DStream* zds, size_t const neededInBuffSize, size_t const neededOutBuffSize)
 {
-    zds->oversizedDuration += ZSTD_DCtx_isOverflow(zds, neededInBuffSize, neededOutBuffSize) != 0;
+    if (ZSTD_DCtx_isOverflow(zds, neededInBuffSize, neededOutBuffSize))
+        zds->oversizedDuration++;
+    else 
+        zds->oversizedDuration = 0;
 }
 
 static int ZSTD_DCtx_isOversizedTooLong(ZSTD_DStream* zds)