summaryrefslogtreecommitdiffstats
path: root/test/links.c
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2009-10-27 20:56:54 (GMT)
committerNeil Fortner <nfortne2@hdfgroup.org>2009-10-27 20:56:54 (GMT)
commit34c8292e76d33024e11e74c864a410b321f5dd5a (patch)
tree3125989ca809112ea42e521908c5fee6a7657fdb /test/links.c
parentab3f3e0219d80b5407fe5da785a7faae443c7ffc (diff)
downloadhdf5-34c8292e76d33024e11e74c864a410b321f5dd5a.zip
hdf5-34c8292e76d33024e11e74c864a410b321f5dd5a.tar.gz
hdf5-34c8292e76d33024e11e74c864a410b321f5dd5a.tar.bz2
[svn-r17751] Purpose: Fix assertion failure caused by H5Tcommit1/2
Description: Calling H5Tcommit1 or H5Tcommit2 on a file with read only access would cause an assertion failure. Added a check to H5T_commit_named to return a failure in this case. Also a minor fix in the link_filters test. Tested: Fedora 11 (very minor change)
Diffstat (limited to 'test/links.c')
-rw-r--r--test/links.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/links.c b/test/links.c
index 8ee16a6..3cc7a36 100644
--- a/test/links.c
+++ b/test/links.c
@@ -8754,8 +8754,8 @@ link_filters(hid_t fapl, hbool_t new_format)
|| filter_config_out != (H5Z_FILTER_CONFIG_ENCODE_ENABLED
| H5Z_FILTER_CONFIG_DECODE_ENABLED))
TEST_ERROR
- if(H5Pget_filter2(gcpl2, 2, &flags_out, &cd_nelmts, &cd_value_out, (size_t)24,
- name_out, &filter_config_out) < 0)
+ if(H5Pget_filter2(gcpl2, nfilters - 1, &flags_out, &cd_nelmts,
+ &cd_value_out, (size_t)24, name_out, &filter_config_out) < 0)
TEST_ERROR
if(flags_out != 0 || cd_value_out != cd_value
|| HDstrcmp(filter_class.name, name_out)