]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
minor changes
authorYann Collet <yann.collet.73@gmail.com>
Sat, 13 Aug 2016 18:49:47 +0000 (20:49 +0200)
committerYann Collet <yann.collet.73@gmail.com>
Tue, 16 Aug 2016 13:11:28 +0000 (15:11 +0200)
programs/fileio.c

index b04ee3b047637b4178eeac7c6c6a03c55d7eba53..01e08cfbe3050559470104ca4c34438ba96892fa 100644 (file)
@@ -22,8 +22,7 @@
   - zstd homepage : http://www.zstd.net
 */
 /*
-  Note : this is stand-alone program.
-  It is not part of ZSTD compression library, it is a user program of ZSTD library.
+  Note : this file is part of zstd command line, which is not library.
   The license of ZSTD library is BSD.
   The license of this file is GPLv2.
 */
@@ -173,10 +172,9 @@ static FILE* FIO_openSrcFile(const char* srcFileName)
         SET_BINARY_MODE(stdin);
     } else {
         f = fopen(srcFileName, "rb");
+        if ( f==NULL ) DISPLAYLEVEL(1, "zstd: %s: %s \n", srcFileName, strerror(errno));
     }
 
-    if ( f==NULL ) DISPLAYLEVEL(1, "zstd: %s: %s \n", srcFileName, strerror(errno));
-
     return f;
 }
 
@@ -212,9 +210,9 @@ static FILE* FIO_openDstFile(const char* dstFileName)
                     while ((ch!=EOF) && (ch!='\n')) ch = getchar();  /* flush rest of input line */
         }   }   }
         f = fopen( dstFileName, "wb" );
+        if (f==NULL) DISPLAYLEVEL(1, "zstd: %s: %s\n", dstFileName, strerror(errno));
     }
 
-    if (f==NULL) DISPLAYLEVEL(1, "zstd: %s: %s\n", dstFileName, strerror(errno));
     return f;
 }