summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2003-11-06 13:43:02 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2003-11-06 13:43:02 (GMT)
commitdebbaac81db5258c30bc959fde286afd6e58cab1 (patch)
tree83401284b52d3a11d10c3b81d654ef4d4718667d /src
parent3ddea291c67480621189e7563d3151c6caf519a1 (diff)
downloadhdf5-debbaac81db5258c30bc959fde286afd6e58cab1.zip
hdf5-debbaac81db5258c30bc959fde286afd6e58cab1.tar.gz
hdf5-debbaac81db5258c30bc959fde286afd6e58cab1.tar.bz2
[svn-r7820] Purpose:
Bug fix Description: Don't check the number of szip parameters set during the "can apply" and "set local" callbacks, be safe about setting the parameters instead. Platforms tested: FreeBSD 4.9 (sleipnir) too minor to require h5committest
Diffstat (limited to 'src')
-rw-r--r--src/H5Zszip.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/H5Zszip.c b/src/H5Zszip.c
index 5d4922d..94df634 100644
--- a/src/H5Zszip.c
+++ b/src/H5Zszip.c
@@ -103,10 +103,6 @@ H5Z_can_apply_szip(hid_t dcpl_id, hid_t type_id, hid_t space_id)
if(H5Pget_filter_by_id(dcpl_id,H5Z_FILTER_SZIP,&flags,&cd_nelmts, cd_values,0,NULL)<0)
HGOTO_ERROR(H5E_PLINE, H5E_CANTGET, FAIL, "can't get szip parameters")
- /* Check that no parameters are currently set */
- if(cd_nelmts!=H5Z_SZIP_USER_NPARMS)
- HGOTO_ERROR(H5E_PLINE, H5E_BADVALUE, FAIL, "incorrect # of szip parameters")
-
/* Get datatype's size, for checking the "bits-per-pixel" */
if((dtype_size=(sizeof(unsigned char)*H5Tget_size(type_id)))==0)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "bad datatype size")
@@ -178,10 +174,6 @@ H5Z_set_local_szip(hid_t dcpl_id, hid_t type_id, hid_t space_id)
if(H5Pget_filter_by_id(dcpl_id,H5Z_FILTER_SZIP,&flags,&cd_nelmts, cd_values,0,NULL)<0)
HGOTO_ERROR(H5E_PLINE, H5E_CANTGET, FAIL, "can't get szip parameters")
- /* Check that no parameters are currently set */
- if(cd_nelmts!=H5Z_SZIP_USER_NPARMS)
- HGOTO_ERROR(H5E_PLINE, H5E_BADVALUE, FAIL, "incorrect # of szip parameters")
-
/* Get dimensions for dataspace */
if ((ndims=H5Sget_simple_extent_dims(space_id, dims, NULL))<0)
HGOTO_ERROR(H5E_PLINE, H5E_CANTGET, FAIL, "unable to get dataspace dimensions")
@@ -201,6 +193,7 @@ H5Z_set_local_szip(hid_t dcpl_id, hid_t type_id, hid_t space_id)
/* Set the correct endianness flag for szip */
/* (Note: this may not handle non-atomic datatypes well) */
+ cd_values[H5Z_SZIP_PARM_MASK] &= ~(SZ_LSB_OPTION_MASK|SZ_MSB_OPTION_MASK);
switch(dtype_order) {
case H5T_ORDER_LE: /* Little-endian byte order */
cd_values[H5Z_SZIP_PARM_MASK] |= SZ_LSB_OPTION_MASK;