diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2013-10-31 04:20:36 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2013-10-31 04:20:36 (GMT) |
commit | e6cace9ee46e903a8612aba7d9d1d72fa0968217 (patch) | |
tree | ac7d07ea06d3d5ac73e34bc54ff17620a4d083fe /test/tarray.c | |
parent | 2eb24b16dac78b3e27769c20502299475fb8dde6 (diff) | |
download | hdf5-e6cace9ee46e903a8612aba7d9d1d72fa0968217.zip hdf5-e6cace9ee46e903a8612aba7d9d1d72fa0968217.tar.gz hdf5-e6cace9ee46e903a8612aba7d9d1d72fa0968217.tar.bz2 |
[svn-r24376] Updated all code to use HDmalloc, HDcalloc, and HDfree.
Prep work for adding a memory free function, part of HDFFV-8551.
Tested on:
32-bit LE linux (jam)
* with C++, Fortran
* with thread safety on
These are minor changes (almost entirely renaming foo functions
to HDfoo) that don't change functionality. This should not
require a full commit test.
Diffstat (limited to 'test/tarray.c')
-rw-r--r-- | test/tarray.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/test/tarray.c b/test/tarray.c index 299c74e..e3999bb 100644 --- a/test/tarray.c +++ b/test/tarray.c @@ -637,7 +637,7 @@ test_array_compound_atomic(void) CHECK(mname, NULL, "H5Tget_member_name"); if(HDstrcmp(mname, "i") != 0) TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname); - free(mname); + HDfree(mname); /* Check the 1st field's offset */ off = H5Tget_member_offset(tid2, 0); @@ -656,7 +656,7 @@ test_array_compound_atomic(void) CHECK(mname, NULL, "H5Tget_member_name"); if(HDstrcmp(mname, "f") != 0) TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname); - free(mname); + HDfree(mname); /* Check the 2nd field's offset */ off = H5Tget_member_offset(tid2, 1); @@ -849,7 +849,7 @@ test_array_compound_array(void) CHECK(mname, NULL, "H5Tget_member_name"); if(HDstrcmp(mname,"i")!=0) TestErrPrintf("Compound field name doesn't match!, mname=%s\n",mname); - free(mname); + HDfree(mname); /* Check the 1st field's offset */ off=H5Tget_member_offset(tid2,0); @@ -868,7 +868,7 @@ test_array_compound_array(void) CHECK(mname, NULL, "H5Tget_member_name"); if(HDstrcmp(mname,"f")!=0) TestErrPrintf("Compound field name doesn't match!, mname=%s\n",mname); - free(mname); + HDfree(mname); /* Check the 2nd field's offset */ off=H5Tget_member_offset(tid2,1); @@ -1041,7 +1041,7 @@ test_array_vlen_atomic(void) /* Initialize array data to write */ for(i=0; i<SPACE1_DIM1; i++) for(j=0; j<ARRAY1_DIM1; j++) { - wdata[i][j].p=malloc((i+j+1)*sizeof(unsigned int)); + wdata[i][j].p=HDmalloc((i+j+1)*sizeof(unsigned int)); wdata[i][j].len=i+j+1; for(k=0; k<(i+j+1); k++) ((unsigned int *)wdata[i][j].p)[k]=i*100+j*10+k; @@ -1252,7 +1252,7 @@ test_array_vlen_array(void) /* Initialize array data to write */ for(i=0; i<SPACE1_DIM1; i++) for(j=0; j<ARRAY1_DIM1; j++) { - wdata[i][j].p=malloc((i+j+1)*(sizeof(unsigned int)*ARRAY1_DIM1)); + wdata[i][j].p=HDmalloc((i+j+1)*(sizeof(unsigned int)*ARRAY1_DIM1)); wdata[i][j].len=i+j+1; for(k=0; k<(i+j+1); k++) for(l=0; l<ARRAY1_DIM1; l++) @@ -1633,7 +1633,7 @@ test_array_bkg(void) /* Release memory resources */ /* ------------------------ */ for (i = 0; i < dtsinfo.nsubfields; i++) - free(dtsinfo.name[i]); + HDfree(dtsinfo.name[i]); /* Release IDs */ @@ -1848,7 +1848,7 @@ test_compat(void) CHECK(mname, NULL, "H5Tget_member_name"); if(HDstrcmp(mname,"i")!=0) TestErrPrintf("Compound field name doesn't match!, mname=%s\n",mname); - free(mname); + HDfree(mname); /* Check the 1st field's offset */ off=H5Tget_member_offset(tid1,0); @@ -1867,7 +1867,7 @@ test_compat(void) CHECK(mname, NULL, "H5Tget_member_name"); if(HDstrcmp(mname,"f")!=0) TestErrPrintf("Compound field name doesn't match!, mname=%s\n",mname); - free(mname); + HDfree(mname); /* Check the 2nd field's offset */ off=H5Tget_member_offset(tid1,1); @@ -1886,7 +1886,7 @@ test_compat(void) CHECK(mname, NULL, "H5Tget_member_name"); if(HDstrcmp(mname,"l")!=0) TestErrPrintf("Compound field name doesn't match!, mname=%s\n",mname); - free(mname); + HDfree(mname); /* Check the 3rd field's offset */ off=H5Tget_member_offset(tid1,2); @@ -1930,7 +1930,7 @@ test_compat(void) CHECK(mname, NULL, "H5Tget_member_name"); if(mname && HDstrcmp(mname,"i")!=0) TestErrPrintf("Compound field name doesn't match!, mname=%s\n",mname); - if(mname) free(mname); + if(mname) HDfree(mname); /* Check the 1st field's offset */ off=H5Tget_member_offset(tid1,0); @@ -1949,7 +1949,7 @@ test_compat(void) CHECK(mname, NULL, "H5Tget_member_name"); if(mname && HDstrcmp(mname,"f")!=0) TestErrPrintf("Compound field name doesn't match!, mname=%s\n",mname); - if(mname) free(mname); + if(mname) HDfree(mname); /* Check the 2nd field's offset */ off=H5Tget_member_offset(tid1,1); @@ -1994,7 +1994,7 @@ test_compat(void) CHECK(mname, NULL, "H5Tget_member_name"); if(mname && HDstrcmp(mname,"l")!=0) TestErrPrintf("Compound field name doesn't match!, mname=%s\n",mname); - if(mname) free(mname); + if(mname) HDfree(mname); /* Check the 3rd field's offset */ off=H5Tget_member_offset(tid1,2); @@ -2039,7 +2039,7 @@ test_compat(void) CHECK(mname, NULL, "H5Tget_member_name"); if(mname && HDstrcmp(mname,"d")!=0) TestErrPrintf("Compound field name doesn't match!, mname=%s\n",mname); - if(mname) free(mname); + if(mname) HDfree(mname); /* Check the 4th field's offset */ off=H5Tget_member_offset(tid1,3); |