Skip to content

Commit

Permalink
Fixed calloc arg flips in h5repacktst.c
Browse files Browse the repository at this point in the history
  • Loading branch information
derobins committed Oct 20, 2024
1 parent f263066 commit 788cfba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/test/h5repack/h5repacktst.c
Original file line number Diff line number Diff line change
Expand Up @@ -4682,8 +4682,8 @@ make_dset_reg_ref(hid_t loc_id)
int retval = -1; /* return value */

/* Allocate write & read buffers */
wbuf = (hdset_reg_ref_t *)calloc(sizeof(hdset_reg_ref_t), (size_t)SPACE1_DIM1);
dwbuf = (int *)malloc(sizeof(int) * SPACE2_DIM1 * SPACE2_DIM2);
wbuf = (hdset_reg_ref_t *)calloc(SPACE1_DIM1, sizeof(hdset_reg_ref_t));
dwbuf = (int *)malloc((SPACE2_DIM1 * SPACE2_DIM2) * sizeof(int));

/* Create dataspace for datasets */
if ((sid2 = H5Screate_simple(SPACE2_RANK, dims2, NULL)) < 0)
Expand Down

0 comments on commit 788cfba

Please sign in to comment.