summaryrefslogtreecommitdiffstats
path: root/src/H5FDperform.c
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2022-03-17 14:53:19 (GMT)
committerGitHub <noreply@github.com>2022-03-17 14:53:19 (GMT)
commit96398e47af98c55e14b81527a354c2f83c370576 (patch)
tree6cec155318c0550286f7738b712164e163678e43 /src/H5FDperform.c
parent34442f37400b0090cf56179f3851b21d7950f91c (diff)
downloadhdf5-96398e47af98c55e14b81527a354c2f83c370576.zip
hdf5-96398e47af98c55e14b81527a354c2f83c370576.tar.gz
hdf5-96398e47af98c55e14b81527a354c2f83c370576.tar.bz2
Misc fixes highlighted by the checkposix script (#1499)
Diffstat (limited to 'src/H5FDperform.c')
-rw-r--r--src/H5FDperform.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/H5FDperform.c b/src/H5FDperform.c
index 096fdd6..4a68c6e 100644
--- a/src/H5FDperform.c
+++ b/src/H5FDperform.c
@@ -29,13 +29,14 @@
* Function: H5FDperform_init
*
* Purpose: Ensure that the library is initialized and then call
- * the provided VFD initializer.
+ * the provided VFD initializer
*
- * Return: Success: identifier for the VFD just initialized
+ * Return: Success: Identifier for the VFD just initialized
* Failure: H5I_INVALID_HID
*-------------------------------------------------------------------------
*/
-hid_t H5FDperform_init(hid_t (*init)(void))
+hid_t
+H5FDperform_init(H5FD_init_t op)
{
hid_t ret_value = H5I_INVALID_HID; /* Return value */
@@ -43,16 +44,16 @@ hid_t H5FDperform_init(hid_t (*init)(void))
/*NO TRACE*/
/* It is possible that an application will evaluate an
- * `H5FD_*` symbol (`H5FD_FAMILY`, `H5FD_MULTI`, `H5FD_SEC2`, et
- * cetera) before the library has had an opportunity to initialize.
- * Call H5_init_library() to make sure that the library has been
- * initialized before `init` is run.
+ * `H5FD_*` symbol (`H5FD_FAMILY`, `H5FD_MULTI`, `H5FD_SEC2`, etc.
+ * before the library has had an opportunity to initialize. Call
+ * H5_init_library() to make sure that the library has been initialized
+ * before `init` is run.
*/
- if (H5_init_library() < 0) {
+ if (H5_init_library() < 0)
HGOTO_ERROR(H5E_FUNC, H5E_CANTINIT, H5I_INVALID_HID, "library initialization failed")
- }
- ret_value = init();
+ ret_value = op();
+
done:
FUNC_LEAVE_API_NOINIT(ret_value)
}