summaryrefslogtreecommitdiffstats
path: root/test/th5s.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2006-10-23 20:40:14 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2006-10-23 20:40:14 (GMT)
commite40557304fcfc662bb1a445abca516ee4b246d94 (patch)
treec9f1692443a62e0c481c7c0278e39d7b83d1b419 /test/th5s.c
parent1062b4f9d7080a3e439df7d3d527aee43f96d085 (diff)
downloadhdf5-e40557304fcfc662bb1a445abca516ee4b246d94.zip
hdf5-e40557304fcfc662bb1a445abca516ee4b246d94.tar.gz
hdf5-e40557304fcfc662bb1a445abca516ee4b246d94.tar.bz2
[svn-r12803] Description:
Finish new version of the I/O pipeline message, which is much smaller than the previous version. This version is used with the "use the latest version of the format" flag. Closed several memory leaks/overruns (found with valgrind). Also, lots of compiler & formatting cleanups. Tested on: Linux/32 2.6 (chicago) Linux/64 2.6 (chicago2)
Diffstat (limited to 'test/th5s.c')
-rw-r--r--test/th5s.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/th5s.c b/test/th5s.c
index 9fbe35f..359f023 100644
--- a/test/th5s.c
+++ b/test/th5s.c
@@ -363,7 +363,7 @@ test_h5s_null(void)
hsize_t coord[1][1]; /* Coordinates for point selection */
coord[0][0]=0;
- ret = H5Sselect_elements(sid, H5S_SELECT_SET, 1, (const hsize_t **)coord);
+ ret = H5Sselect_elements(sid, H5S_SELECT_SET, (size_t)1, (const hsize_t **)coord);
} H5E_END_TRY;
VERIFY(ret, FAIL, "H5Sselect_elements");
@@ -559,7 +559,7 @@ test_h5s_encode(void)
CHECK(ret, FAIL, "H5Sencode");
if(sbuf_size>0)
- sbuf = (unsigned char*)calloc(1, sbuf_size);
+ sbuf = (unsigned char*)HDcalloc((size_t)1, sbuf_size);
/* Try decoding bogus buffer */
H5E_BEGIN_TRY {
@@ -614,7 +614,7 @@ test_h5s_encode(void)
CHECK(ret, FAIL, "H5Sencode");
if(null_size>0)
- null_sbuf = (unsigned char*)calloc(1, null_size);
+ null_sbuf = (unsigned char*)HDcalloc((size_t)1, null_size);
ret = H5Sencode(sid2, null_sbuf, &null_size);
CHECK(ret, FAIL, "H5Sencode");
@@ -646,7 +646,7 @@ test_h5s_encode(void)
CHECK(ret, FAIL, "H5Sencode");
if(scalar_size>0)
- scalar_buf = (unsigned char*)calloc(1, scalar_size);
+ scalar_buf = (unsigned char*)HDcalloc((size_t)1, scalar_size);
ret = H5Sencode(sid3, scalar_buf, &scalar_size);
CHECK(ret, FAIL, "H5Sencode");
@@ -674,9 +674,9 @@ test_h5s_encode(void)
ret = H5Sclose(decoded_sid3);
CHECK(ret, FAIL, "H5Sclose");
- free(sbuf);
- free(null_sbuf);
- free(scalar_buf);
+ HDfree(sbuf);
+ HDfree(null_sbuf);
+ HDfree(scalar_buf);
} /* test_h5s_encode() */
/****************************************************************