diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2022-05-06 18:41:58 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-06 18:41:58 (GMT) |
commit | 5b40763b2be26d9a6e7855bbc1528fd8e523a071 (patch) | |
tree | 5ddf9abef10a6a37ead9b9ec5b8d9aee8eb4e3ff /src/H5.c | |
parent | f360225b10fb84b6e51376e814c92f694e3f9627 (diff) | |
download | hdf5-5b40763b2be26d9a6e7855bbc1528fd8e523a071.zip hdf5-5b40763b2be26d9a6e7855bbc1528fd8e523a071.tar.gz hdf5-5b40763b2be26d9a6e7855bbc1528fd8e523a071.tar.bz2 |
Brings random stuff over from develop (#1738)
Diffstat (limited to 'src/H5.c')
-rw-r--r-- | src/H5.c | 17 |
1 files changed, 10 insertions, 7 deletions
@@ -984,7 +984,7 @@ done: /*------------------------------------------------------------------------- * Function: H5close * - * Purpose: Terminate the library and release all resources. + * Purpose: Terminate the library and release all resources. * * Return: Non-negative on success/Negative on failure * @@ -1120,19 +1120,22 @@ H5free_memory(void *mem) herr_t H5is_library_threadsafe(hbool_t *is_ts) { + herr_t ret_value = SUCCEED; /* Return value */ + FUNC_ENTER_API_NOINIT H5TRACE1("e", "*b", is_ts); - HDassert(is_ts); - - /* At this time, it is impossible for this to fail. */ + if (is_ts) { #ifdef H5_HAVE_THREADSAFE - *is_ts = TRUE; + *is_ts = TRUE; #else /* H5_HAVE_THREADSAFE */ - *is_ts = FALSE; + *is_ts = FALSE; #endif /* H5_HAVE_THREADSAFE */ + } + else + ret_value = FAIL; - FUNC_LEAVE_API_NOINIT(SUCCEED) + FUNC_LEAVE_API_NOINIT(ret_value) } /* end H5is_library_threadsafe() */ #if defined(H5_HAVE_THREADSAFE) && defined(H5_BUILT_AS_DYNAMIC_LIB) && defined(H5_HAVE_WIN32_API) && \ |