Skip to content

Commit 442fa2f

Browse files
authored
Merge pull request #4516 from Cyan4973/mingw_calloc_order
minor: fix mingw warnings: calloc argument order
2 parents 6e58e9a + 5539fcf commit 442fa2f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/paramgrill.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1242,7 +1242,7 @@ static int createBuffers(buffers_t* buff, const char* const * const fileNamesTab
12421242
size_t n;
12431243
size_t totalSizeToLoad = (size_t)UTIL_getTotalFileSize(fileNamesTable, (U32)nbFiles);
12441244
size_t benchedSize = MIN(BMK_findMaxMem(totalSizeToLoad * 3) / 3, totalSizeToLoad);
1245-
size_t* fileSizes = calloc(sizeof(size_t), nbFiles);
1245+
size_t* fileSizes = calloc(nbFiles, sizeof(size_t));
12461246
void* srcBuffer = NULL;
12471247
int ret = 0;
12481248

@@ -1457,7 +1457,7 @@ createMemoTableArray(const paramValues_t p,
14571457
const size_t varyLen,
14581458
const U32 memoTableLog)
14591459
{
1460-
memoTable_t* const mtAll = (memoTable_t*)calloc(sizeof(memoTable_t),(ZSTD_STRATEGY_MAX + 1));
1460+
memoTable_t* const mtAll = (memoTable_t*)calloc((ZSTD_STRATEGY_MAX + 1), sizeof(memoTable_t));
14611461
ZSTD_strategy i, stratMin = ZSTD_STRATEGY_MIN, stratMax = ZSTD_STRATEGY_MAX;
14621462

14631463
if(mtAll == NULL) {
@@ -1494,7 +1494,7 @@ createMemoTableArray(const paramValues_t p,
14941494
mtl = ((size_t)1 << memoTableLog);
14951495
}
14961496

1497-
mtAll[i].table = (BYTE*)calloc(sizeof(BYTE), mtl);
1497+
mtAll[i].table = (BYTE*)calloc(mtl, sizeof(BYTE));
14981498
mtAll[i].tableLen = mtl;
14991499

15001500
if(mtAll[i].table == NULL) {

0 commit comments

Comments
 (0)