]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Updated expression for better readability 2969/head
authorYann Collet <cyan@fb.com>
Tue, 4 Jan 2022 17:07:11 +0000 (09:07 -0800)
committerYann Collet <cyan@fb.com>
Tue, 4 Jan 2022 17:07:11 +0000 (09:07 -0800)
lib/compress/zstd_cwksp.h

index 468b06da0ae13f3d989a2e134bc2c958cfc38c25..dc3f40c80c32204610955051dc881ad25b4e808f 100644 (file)
@@ -306,10 +306,10 @@ ZSTD_cwksp_internal_advance_phase(ZSTD_cwksp* ws, ZSTD_cwksp_alloc_phase_e phase
                 RETURN_ERROR_IF(objectEnd > ws->workspaceEnd, memory_allocation,
                                 "table phase - alignment initial allocation failed!");
                 ws->objectEnd = objectEnd;
-                ws->tableEnd = objectEnd;
-                if (ws->tableEnd > ws->tableValidEnd) ws->tableValidEnd = objectEnd;
-            }
-        }
+                ws->tableEnd = objectEnd;  /* table area starts being empty */
+                if (ws->tableValidEnd < ws->tableEnd) {
+                    ws->tableValidEnd = ws->tableEnd;
+        }   }   }
         ws->phase = phase;
         ZSTD_cwksp_assert_internal_consistency(ws);
     }