]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Move the variable declarations to the top
authorScott Baker <scott@perturb.org>
Sat, 5 Jun 2021 05:03:33 +0000 (22:03 -0700)
committerW. Felix Handte <w@felixhandte.com>
Thu, 10 Jun 2021 16:53:07 +0000 (12:53 -0400)
programs/fileio.c

index b5beb145c5245a87066549b3eb1f7ce17c0e7056..b347da423de51d7224c65bfd809411811a1b1ce1 100644 (file)
@@ -1544,6 +1544,9 @@ FIO_compressFilename_internal(FIO_ctx_t* const fCtx,
     U64 readsize = 0;
     U64 compressedfilesize = 0;
     U64 const fileSize = UTIL_getFileSize(srcFileName);
+       char inputSizeStr[8]  = "";
+       char outputSizeStr[8] = "";
+
     DISPLAYLEVEL(5, "%s: %llu bytes \n", srcFileName, (unsigned long long)fileSize);
 
     /* compression format selection */
@@ -1598,10 +1601,7 @@ FIO_compressFilename_internal(FIO_ctx_t* const fCtx,
                 (unsigned long long)readsize, (unsigned long long) compressedfilesize,
                 dstFileName);
         } else {
-                       char inputSizeStr[8] = "";
                        humanSize((unsigned long long) readsize, inputSizeStr);
-
-                       char outputSizeStr[8] = "";
                        humanSize((unsigned long long) compressedfilesize, outputSizeStr);
 
             DISPLAYLEVEL(2,"%-20s :%6.2f%%   (%s => %s, %s) \n",