]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Fix the logic in printing final status updates
authorsenhuang42 <senhuang96@fb.com>
Tue, 1 Sep 2020 16:46:06 +0000 (12:46 -0400)
committersenhuang42 <senhuang96@fb.com>
Tue, 1 Sep 2020 16:46:06 +0000 (12:46 -0400)
programs/fileio.c

index f4859bb11d53e6b0cd00649bf07d4e7cbdbf7e7d..43fe3ead86805853252744a692fb8bab3f0221b5 100644 (file)
@@ -1508,7 +1508,8 @@ FIO_compressFilename_internal(FIO_prefs_t* const prefs,
                     (unsigned long long)readsize, (unsigned long long) compressedfilesize,
                     dstFileName);
             }
-        } else if (fCtx->nbFilesTotal > 1) {
+        }
+        if (fCtx->nbFilesTotal > 1) {
             fCtx->totalBytesInput += (size_t)readsize;
             fCtx->totalBytesOutput += (size_t)compressedfilesize;
         }
@@ -2418,7 +2419,8 @@ static int FIO_decompressFrames(dRess_t ress, FILE* srcFile,
     if (g_display_prefs.displayLevel >= 2) {
         if (fCtx->nbFilesTotal <= 1 || g_display_prefs.displayLevel >= 3) {
             DISPLAYLEVEL(2, "%-20s: %llu bytes \n", srcFileName, filesize);
-        } else if (fCtx->nbFilesTotal > 1) {
+        }
+        if (fCtx->nbFilesTotal > 1) {
             fCtx->totalBytesOutput += filesize;
         }
     }