1
0
mirror of https://github.com/facebook/zstd.git synced 2025-08-07 06:23:00 +03:00

added in correct error return from main in zstdcli.c

This commit is contained in:
Paul Cruz
2017-06-15 17:46:49 -07:00
parent 0d7c4d766a
commit b3e62446c6
2 changed files with 7 additions and 6 deletions

View File

@@ -1057,11 +1057,11 @@ int FIO_listFile(const char* inFileName, int displayLevel){
} }
else if (error == 2) { else if (error == 2) {
DISPLAYOUT("File %s not compressed with zstd\n\n", inFileName); DISPLAYOUT("File %s not compressed with zstd\n\n", inFileName);
return 0; return 1;
}
} }
displayInfo(inFileName, &info, displayLevel); displayInfo(inFileName, &info, displayLevel);
return 0; return error;
}
} }
int FIO_compressMultipleFilenames(const char** inFileNamesTable, unsigned nbFiles, int FIO_compressMultipleFilenames(const char** inFileNamesTable, unsigned nbFiles,

View File

@@ -686,12 +686,13 @@ int main(int argCount, const char* argv[])
DISPLAY("===========================================\n"); DISPLAY("===========================================\n");
DISPLAY("Number of files listed: %d\n", filenameIdx); DISPLAY("Number of files listed: %d\n", filenameIdx);
{ {
int error = 0;
unsigned u; unsigned u;
for(u=0; u<filenameIdx;u++){ for(u=0; u<filenameIdx;u++){
FIO_listFile(filenameTable[u],g_displayLevel); error = FIO_listFile(filenameTable[u],g_displayLevel);
} }
CLEAN_RETURN(error);
} }
CLEAN_RETURN(0);
} }
/* Check if benchmark is selected */ /* Check if benchmark is selected */
if (operation==zom_bench) { if (operation==zom_bench) {