Skip to content

Commit

Permalink
Merge pull request #2753 from senhuang42/better_error_msg
Browse files Browse the repository at this point in the history
[easy] Fix zstd bench error message
  • Loading branch information
senhuang42 authored Aug 24, 2021
2 parents be82a0a + dce48f5 commit 1f3fc19
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions programs/benchzstd.c
Original file line number Diff line number Diff line change
Expand Up @@ -805,6 +805,10 @@ BMK_benchOutcome_t BMK_benchFilesAdvanced(
RETURN_ERROR(15, BMK_benchOutcome_t, "Invalid Compression Level");
}

if (totalSizeToLoad == UTIL_FILESIZE_UNKNOWN) {
RETURN_ERROR(9, BMK_benchOutcome_t, "Error loading files");
}

fileSizes = (size_t*)calloc(nbFiles, sizeof(size_t));
if (!fileSizes) RETURN_ERROR(12, BMK_benchOutcome_t, "not enough memory for fileSizes");

Expand Down

0 comments on commit 1f3fc19

Please sign in to comment.