]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
[pzstd] Fix test mode for streaming input
authorNick Terrell <terrelln@fb.com>
Wed, 26 Oct 2016 07:09:39 +0000 (00:09 -0700)
committerNick Terrell <terrelln@fb.com>
Wed, 26 Oct 2016 07:09:39 +0000 (00:09 -0700)
contrib/pzstd/Options.cpp

index ece8c07825cf4faed21081ad78932ce0b34fba45..18c069eae52da56c92cac3a7c2b694d5a7fdbc96 100644 (file)
@@ -303,6 +303,12 @@ Options::Status Options::parse(int argc, const char **argv) {
     } // while (*options != 0);
   }   // for (int i = 1; i < argc; ++i);
 
+  // Set options for test mode
+  if (test) {
+    outputFile = nullOutput;
+    keepSource = true;
+  }
+
   // Input file defaults to standard input if not provided.
   if (localInputFiles.empty()) {
     localInputFiles.emplace_back(kStdIn);
@@ -399,11 +405,6 @@ Options::Status Options::parse(int argc, const char **argv) {
     verbosity = 1;
   }
 
-  // Set options for test mode
-  if (test) {
-    outputFile = nullOutput;
-    keepSource = true;
-  }
   return Status::Success;
 }