1
0
mirror of https://github.com/facebook/zstd.git synced 2025-11-27 11:41:11 +03:00

Factor out allocMemory_orDIe(...) in simple_compressionCCtx.c, and amend Makefile to account for dependency on utils.h

This commit is contained in:
Yi Jin
2018-12-16 15:36:28 -08:00
parent 0d14153cfb
commit cce0842c60
3 changed files with 59 additions and 41 deletions

View File

@@ -51,8 +51,8 @@ static size_t fsize_orDie(const char *filename)
off_t const fileSize = st.st_size;
size_t const size = (size_t)fileSize;
/* if off_t -> size_t conversion causes discrepancy, the file size is
* too big for at least 1 type to handle
/* if off_t -> size_t type conversion results in discrepancy,
* the file size is too big for at least one type to handle.
*/
if (size != fileSize) { /* narrowcast overflow */
fprintf(stderr, "%s : filesize too large \n", filename);