summaryrefslogtreecommitdiffstats
path: root/src/H5Pfcpl.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2006-11-29 04:13:02 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2006-11-29 04:13:02 (GMT)
commit2f3344a0495c09448e7fac023c8d91a567110a48 (patch)
treea060e469e3129f63e63ffa1d6e2813bd6d9e1436 /src/H5Pfcpl.c
parent1b16195060d142f4e78a447d1ea360401bcf722d (diff)
downloadhdf5-2f3344a0495c09448e7fac023c8d91a567110a48.zip
hdf5-2f3344a0495c09448e7fac023c8d91a567110a48.tar.gz
hdf5-2f3344a0495c09448e7fac023c8d91a567110a48.tar.bz2
[svn-r12994] Description:
Propagate object creation properties up into group, dataset and named datatype property lists, when those property lists are retrieved for existing objects in a file. Also, add H5Tget_create_plist() API routine, to allow named datatype property lists to be retrieved for named datatypes. Tested on: FreeBSD/32 4.11 (sleipnir) Linux/32 2.4 (heping) Linux/64 2.4 (mir) AIX/32 5.? (copper)
Diffstat (limited to 'src/H5Pfcpl.c')
-rw-r--r--src/H5Pfcpl.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/H5Pfcpl.c b/src/H5Pfcpl.c
index 97c468f..da8e0fa 100644
--- a/src/H5Pfcpl.c
+++ b/src/H5Pfcpl.c
@@ -961,7 +961,6 @@ done:
}
-
/*-------------------------------------------------------------------------
* Function: H5Pset_shared_mesg_phase_change
*
@@ -992,10 +991,15 @@ H5Pset_shared_mesg_phase_change(hid_t plist_id, unsigned max_list, unsigned min_
/* Check that values are sensible. The min_btree value must be no greater
* than the max list plus one.
- * No need to check values otherwise, since they can't be negative.
+ *
+ * Range check to make certain they will fit into encoded form.
*/
if(max_list + 1 < min_btree)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "minimum B-tree value is greater than maximum list value")
+ if(max_list > 65535)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "max list value must be < 65536")
+ if(min_btree > 65535)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "min btree value must be < 65536")
/* Avoid the strange case where max_list == 0 and min_btree == 1, so deleting the
* last message in a B-tree makes it become an empty list.
@@ -1018,7 +1022,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5Pget_sohm_list_max
+ * Function: H5Pget_shared_mesg_phase_change
*
* Purpose: Gets the maximum size of a SOHM list index before it becomes
* a B-tree.
@@ -1056,4 +1060,4 @@ H5Pget_shared_mesg_phase_change(hid_t plist_id, unsigned *max_list, unsigned *mi
done:
FUNC_LEAVE_API(ret_value);
}
-
+