summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJerome Soumagne <jsoumagne@hdfgroup.org>2019-07-16 19:22:31 (GMT)
committerJerome Soumagne <jsoumagne@hdfgroup.org>2019-07-16 19:22:36 (GMT)
commit6c84a83eeaa187c92d445f8ef8565a4337498cd6 (patch)
tree67f6ccdf6746abcd1c4860bd12d4b08270ed456c
parentebc274a67398ff079fad2120ab4eeb31a1bf2a1b (diff)
downloadhdf5-6c84a83eeaa187c92d445f8ef8565a4337498cd6.zip
hdf5-6c84a83eeaa187c92d445f8ef8565a4337498cd6.tar.gz
hdf5-6c84a83eeaa187c92d445f8ef8565a4337498cd6.tar.bz2
H5P: Fix wrong value comparison in assert
Move compile assert of H5P_plist_type to H5P__init_package()
-rw-r--r--src/H5Pint.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/H5Pint.c b/src/H5Pint.c
index a9dc363..5683403 100644
--- a/src/H5Pint.c
+++ b/src/H5Pint.c
@@ -430,6 +430,9 @@ H5P__init_package(void)
FUNC_ENTER_PACKAGE
+ /* Sanity check */
+ HDcompile_assert(H5P_TYPE_VOL_INITIALIZE == (H5P_TYPE_MAX_TYPE - 1));
+
/*
* Initialize the Generic Property class & object groups.
*/
@@ -5434,9 +5437,8 @@ H5P__new_plist_of_type(H5P_plist_type_t type)
FUNC_ENTER_PACKAGE
- /* Sanity checks */
- HDcompile_assert(H5P_TYPE_VOL_INITIALIZE == (H5P_TYPE_MAX_TYPE - 1));
- HDassert(type >= H5P_TYPE_USER && type <= H5P_TYPE_LINK_ACCESS);
+ /* Sanity check */
+ HDassert(type >= H5P_TYPE_USER && type < H5P_TYPE_MAX_TYPE);
/* Check arguments */
if(type == H5P_TYPE_USER)