summaryrefslogtreecommitdiffstats
path: root/src/H5FDsec2.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5FDsec2.c')
-rw-r--r--src/H5FDsec2.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/H5FDsec2.c b/src/H5FDsec2.c
index aabee0f..acc705e 100644
--- a/src/H5FDsec2.c
+++ b/src/H5FDsec2.c
@@ -1075,20 +1075,19 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD__sec2_ctl(H5FD_t H5_ATTR_UNUSED *_file, uint64_t op_code, uint64_t flags,
+H5FD__sec2_ctl(H5FD_t *_file, uint64_t H5_ATTR_UNUSED op_code, uint64_t flags,
const void H5_ATTR_UNUSED *input, void H5_ATTR_UNUSED **output)
{
herr_t ret_value = SUCCEED;
FUNC_ENTER_PACKAGE
- switch (op_code) {
- /* Unknown op code */
- default:
- if (flags & H5FD_CTL__FAIL_IF_UNKNOWN_FLAG)
- HGOTO_ERROR(H5E_VFL, H5E_FCNTL, FAIL, "unknown op_code and fail if unknown flag is set")
- break;
- }
+ /* Sanity checks */
+ HDassert(_file);
+
+ /* No op codes are understood. */
+ if (flags & H5FD_CTL__FAIL_IF_UNKNOWN_FLAG)
+ HGOTO_ERROR(H5E_VFL, H5E_FCNTL, FAIL, "unknown op_code and fail if unknown flag is set")
done:
FUNC_LEAVE_NOAPI(ret_value)