From 4b58e548562fcd2fad26af87052562926da35a06 Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Wed, 1 Jan 2025 21:01:59 -0800 Subject: [PATCH] Fix flipped calloc args in C++ tests --- c++/test/trefer.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/c++/test/trefer.cpp b/c++/test/trefer.cpp index ecc6de6c972..4a9a2f0447b 100644 --- a/c++/test/trefer.cpp +++ b/c++/test/trefer.cpp @@ -555,10 +555,10 @@ test_reference_region_1D() *drbuf; // Buffer for reading numeric data from disk // Allocate write & read buffers - wbuf = static_cast(calloc(sizeof(hdset_reg_ref_t), SPACE1_DIM1)); - rbuf = static_cast(malloc(sizeof(hdset_reg_ref_t) * SPACE1_DIM1)); - dwbuf = static_cast(malloc(sizeof(uint8_t) * SPACE3_DIM1)); - drbuf = static_cast(calloc(sizeof(uint8_t), SPACE3_DIM1)); + wbuf = static_cast(calloc(SPACE1_DIM1, sizeof(hdset_reg_ref_t))); + rbuf = static_cast(calloc(SPACE1_DIM1, sizeof(hdset_reg_ref_t))); + dwbuf = static_cast(calloc(SPACE3_DIM1, sizeof(uint8_t))); + drbuf = static_cast(calloc(SPACE3_DIM1, sizeof(uint8_t))); // Create file FILE1 H5File file1(FILE2, H5F_ACC_TRUNC);