summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2014-08-04 18:37:55 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2014-08-04 18:37:55 (GMT)
commit4defea00206886aa5dded50896c1ac5c5c1fcceb (patch)
tree543a6e3176cf18c7455bfd2d44597ebd8fafe436 /src
parent1bd45cb96f5b463c14ac56d8362b3992be6128c6 (diff)
downloadhdf5-4defea00206886aa5dded50896c1ac5c5c1fcceb.zip
hdf5-4defea00206886aa5dded50896c1ac5c5c1fcceb.tar.gz
hdf5-4defea00206886aa5dded50896c1ac5c5c1fcceb.tar.bz2
[svn-r25508] Added a check that ensures page_size is not set to zero in
H5Pset_core_write_tracking(). This ensures that the behavior matches the description in the reference manual. Tested on a local linux VM. This is a very minor change.
Diffstat (limited to 'src')
-rw-r--r--src/H5Pfapl.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/H5Pfapl.c b/src/H5Pfapl.c
index 83e0a0f..089bfb9 100644
--- a/src/H5Pfapl.c
+++ b/src/H5Pfapl.c
@@ -3025,6 +3025,10 @@ H5Pset_core_write_tracking(hid_t plist_id, hbool_t is_enabled, size_t page_size)
FUNC_ENTER_API(FAIL)
H5TRACE3("e", "ibz", plist_id, is_enabled, page_size);
+ /* The page size cannot be zero */
+ if(page_size == 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "page_size cannot be zero")
+
/* Get the plist structure */
if(NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS)))
HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID")