]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Clean up default sparse logic 642/head
authorNick Terrell <terrelln@fb.com>
Fri, 31 Mar 2017 22:20:50 +0000 (15:20 -0700)
committerNick Terrell <terrelln@fb.com>
Fri, 31 Mar 2017 22:20:50 +0000 (15:20 -0700)
programs/fileio.c

index 87871ae0151f1a7df4be7d0f1167ea0c927ba075..78fb9a268b2d6df2682204ea2dae756071349157 100644 (file)
@@ -227,8 +227,8 @@ static FILE* FIO_openDstFile(const char* dstFileName)
             DISPLAYLEVEL(4, "Sparse File Support is automatically disabled on stdout ; try --sparse \n");
         }
     } else {
-        if (ZSTD_SPARSE_DEFAULT == 0 && g_sparseFileSupport == 1) {
-            g_sparseFileSupport = 0;
+        if (g_sparseFileSupport == 1) {
+            g_sparseFileSupport = ZSTD_SPARSE_DEFAULT;
         }
         if (!g_overwrite && strcmp (dstFileName, nulmark)) {  /* Check if destination file already exists */
             f = fopen( dstFileName, "rb" );