summaryrefslogtreecommitdiffstats
path: root/test/ttsafe_cancel.c
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2015-05-07 21:05:14 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2015-05-07 21:05:14 (GMT)
commit984ecb72c2fa62d233383b24047e04061754ae34 (patch)
treea0a1ce905153a08466dae1354e14d426c86b3849 /test/ttsafe_cancel.c
parented599421c5ef01347368d50b1b7dbed3b323c43f (diff)
parent8f82c9b8be875cd28e18402e920f8e162d8f8d38 (diff)
downloadhdf5-984ecb72c2fa62d233383b24047e04061754ae34.zip
hdf5-984ecb72c2fa62d233383b24047e04061754ae34.tar.gz
hdf5-984ecb72c2fa62d233383b24047e04061754ae34.tar.bz2
[svn-r27038] Merge of r26393-27031 from the trunk.
Tested on 64-bit linux VM w/ C++ and Fortran 2003
Diffstat (limited to 'test/ttsafe_cancel.c')
-rw-r--r--test/ttsafe_cancel.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/test/ttsafe_cancel.c b/test/ttsafe_cancel.c
index 56f431e..d8ed462 100644
--- a/test/ttsafe_cancel.c
+++ b/test/ttsafe_cancel.c
@@ -123,7 +123,7 @@ void tts_cancel(void)
void *tts_cancel_thread(void UNUSED *arg)
{
int datavalue;
- int *buffer;
+ int buffer;
hid_t dataspace, datatype, dataset;
hsize_t dimsf[1]; /* dataset dimensions */
cancel_cleanup_t *cleanup_structure;
@@ -156,10 +156,9 @@ void *tts_cancel_thread(void UNUSED *arg)
ret=H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, &datavalue);
assert(ret>=0);
- buffer = HDmalloc(sizeof(int));
- ret=H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buffer);
+ ret=H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, &buffer);
assert(ret>=0);
- ret=H5Diterate(buffer, H5T_NATIVE_INT, dataspace, tts_cancel_callback, &dataset);
+ ret=H5Diterate(&buffer, H5T_NATIVE_INT, dataspace, tts_cancel_callback, &dataset);
assert(ret>=0);
sleep(3);