Skip to content

Commit

Permalink
minor nits
Browse files Browse the repository at this point in the history
  • Loading branch information
embg committed Dec 28, 2022
1 parent 8052b10 commit 1e60543
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions contrib/externalMatchfinder/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ int main(int argc, char *argv[]) {
}

char* const src = malloc(srcSize + 1);
assert(src);
{
size_t const ret = fread(src, srcSize, 1, f);
assert(ret == 1);
Expand All @@ -70,6 +71,7 @@ int main(int argc, char *argv[]) {

size_t const dstSize = ZSTD_compressBound(srcSize);
char* const dst = malloc(dstSize);
assert(dst);

size_t const cSize = ZSTD_compress2(zc, dst, dstSize, src, srcSize);
CHECK(cSize);
Expand Down
4 changes: 2 additions & 2 deletions tests/zstreamtest.c
Original file line number Diff line number Diff line change
Expand Up @@ -1837,9 +1837,9 @@ static int basicUnitTests(U32 seed, double compressibility, int bigTests)
DISPLAYLEVEL(3, "test%3i : External matchfinder API: ", testNb++);
{
size_t const dstBufSize = ZSTD_compressBound(CNBufferSize);
BYTE* dstBuf = (BYTE*)malloc(ZSTD_compressBound(dstBufSize));
BYTE* const dstBuf = (BYTE*)malloc(ZSTD_compressBound(dstBufSize));
size_t const checkBufSize = CNBufferSize;
BYTE* checkBuf = (BYTE*)malloc(checkBufSize);
BYTE* const checkBuf = (BYTE*)malloc(checkBufSize);
int enableFallback;
EMF_testCase externalMatchState;

Expand Down

0 comments on commit 1e60543

Please sign in to comment.