diff options
Diffstat (limited to 'test/ttsafe_cancel.c')
-rw-r--r-- | test/ttsafe_cancel.c | 7 |
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); |