1
0
mirror of https://github.com/facebook/zstd.git synced 2025-07-29 11:21:22 +03:00

better error handling

This commit is contained in:
Yann Collet
2016-09-09 19:33:56 +02:00
parent 746b51de51
commit a2664649df
8 changed files with 21 additions and 17 deletions

View File

@ -51,7 +51,6 @@ static size_t fwrite_orDie(const void* buffer, size_t sizeToWrite, FILE* file)
exit(5);
}
static size_t fclose_orDie(FILE* file)
{
if (!fclose(file)) return 0;
@ -85,6 +84,7 @@ static void decompressFile_orDie(const char* fname)
}
}
ZSTD_freeDStream(dstream);
fclose_orDie(fin);
fclose_orDie(fout);
free(buffIn);