summaryrefslogtreecommitdiffstats
path: root/src/H5Zszip.c
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2010-08-05 15:53:16 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2010-08-05 15:53:16 (GMT)
commitbb83e1ff9a7c424ed9e8a72d737703c9f6e78ad8 (patch)
treef21ffcc406317546a0e168df2305e74846d046ba /src/H5Zszip.c
parent30ac7d89a2ceb5ea3168ac61748905d9625811eb (diff)
downloadhdf5-bb83e1ff9a7c424ed9e8a72d737703c9f6e78ad8.zip
hdf5-bb83e1ff9a7c424ed9e8a72d737703c9f6e78ad8.tar.gz
hdf5-bb83e1ff9a7c424ed9e8a72d737703c9f6e78ad8.tar.bz2
[svn-r19172] Bug fix for #1239 - The filter's public function CAN_APPLY should return htri_t not
herr_t. To minimize the change of the library's behavior, in the function H5Z_prelude_callback of H5Z.c, if the return value of can_apply is FALSE and the filter is MANDATE, this function returns a FAILURE. If the return value is FALSE but the filter is OPTIONAL, this function returns a SUCCEED. During the IO, the filter will fail and return a size of zero. But the pipeline will skip this filter. Tested on jam, linew, and amani. Tested on jam with szip.
Diffstat (limited to 'src/H5Zszip.c')
-rw-r--r--src/H5Zszip.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/H5Zszip.c b/src/H5Zszip.c
index ba8da6c..e74692c 100644
--- a/src/H5Zszip.c
+++ b/src/H5Zszip.c
@@ -34,7 +34,7 @@
#endif
/* Local function prototypes */
-static herr_t H5Z_can_apply_szip(hid_t dcpl_id, hid_t type_id, hid_t space_id);
+static htri_t H5Z_can_apply_szip(hid_t dcpl_id, hid_t type_id, hid_t space_id);
static herr_t H5Z_set_local_szip(hid_t dcpl_id, hid_t type_id, hid_t space_id);
static size_t H5Z_filter_szip (unsigned flags, size_t cd_nelmts,
const unsigned cd_values[], size_t nbytes, size_t *buf_size, void **buf);
@@ -76,13 +76,13 @@ H5Z_class2_t H5Z_SZIP[1] = {{
*
*-------------------------------------------------------------------------
*/
-static herr_t
+static htri_t
H5Z_can_apply_szip(hid_t UNUSED dcpl_id, hid_t type_id, hid_t UNUSED space_id)
{
const H5T_t *type; /* Datatype */
unsigned dtype_size; /* Datatype's size (in bits) */
H5T_order_t dtype_order; /* Datatype's endianness order */
- herr_t ret_value = TRUE; /* Return value */
+ htri_t ret_value = TRUE; /* Return value */
FUNC_ENTER_NOAPI(H5Z_can_apply_szip, FAIL)