summaryrefslogtreecommitdiffstats
path: root/src/H5TS.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5TS.c')
-rw-r--r--src/H5TS.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/H5TS.c b/src/H5TS.c
index 987bead..6a64a14 100644
--- a/src/H5TS.c
+++ b/src/H5TS.c
@@ -255,19 +255,18 @@ H5TS_cancel_count_inc(void)
if (!cancel_counter) {
/*
- * First time thread calls library - create new counter and associate
+ * First time thread calls library - create new counter and associate
* with key
*/
- cancel_counter = (H5TS_cancel_t *)H5MM_calloc(sizeof(H5TS_cancel_t));
+ cancel_counter = (H5TS_cancel_t *)HDcalloc(1, sizeof(H5TS_cancel_t));
- if (!cancel_counter) {
- H5E_push_stack(NULL, "H5TS_cancel_count_inc",
- __FILE__, __LINE__, H5E_ERR_CLS_g, H5E_RESOURCE, H5E_NOSPACE, "memory allocation failed");
- return FAIL;
- }
+ if (!cancel_counter) {
+ H5E_push_stack(NULL, "H5TS_cancel_count_inc", __FILE__, __LINE__,
+ H5E_ERR_CLS_g, H5E_RESOURCE, H5E_NOSPACE, "memory allocation failed");
+ return FAIL;
+ }
- ret_value = pthread_setspecific(H5TS_cancel_key_g,
- (void *)cancel_counter);
+ ret_value = pthread_setspecific(H5TS_cancel_key_g, (void *)cancel_counter);
}
if (cancel_counter->cancel_count == 0)