diff options
author | Raymond Lu <songyulu@hdfgroup.org> | 2010-08-05 17:13:29 (GMT) |
---|---|---|
committer | Raymond Lu <songyulu@hdfgroup.org> | 2010-08-05 17:13:29 (GMT) |
commit | abf4926632d90f52e7f991e0b8120d0335073476 (patch) | |
tree | 217ec25575e921dbe8058c4fde6de1ffae00f27c /src/H5Znbit.c | |
parent | 1b5fdb13ba8937fa641921e5c3926f4ecd819559 (diff) | |
download | hdf5-abf4926632d90f52e7f991e0b8120d0335073476.zip hdf5-abf4926632d90f52e7f991e0b8120d0335073476.tar.gz hdf5-abf4926632d90f52e7f991e0b8120d0335073476.tar.bz2 |
[svn-r19174] 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, lnew, and amani. Tested on jam with szip.
Diffstat (limited to 'src/H5Znbit.c')
-rw-r--r-- | src/H5Znbit.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/H5Znbit.c b/src/H5Znbit.c index 8f785a2..bcdd549 100644 --- a/src/H5Znbit.c +++ b/src/H5Znbit.c @@ -38,7 +38,7 @@ typedef struct { } parms_atomic; /* Local function prototypes */ -static herr_t H5Z_can_apply_nbit(hid_t dcpl_id, hid_t type_id, hid_t space_id); +static htri_t H5Z_can_apply_nbit(hid_t dcpl_id, hid_t type_id, hid_t space_id); static herr_t H5Z_set_local_nbit(hid_t dcpl_id, hid_t type_id, hid_t space_id); static size_t H5Z_filter_nbit(unsigned flags, size_t cd_nelmts, const unsigned cd_values[], size_t nbytes, size_t *buf_size, void **buf); @@ -129,11 +129,11 @@ static unsigned parms_index = 0; * *------------------------------------------------------------------------- */ -static herr_t +static htri_t H5Z_can_apply_nbit(hid_t UNUSED dcpl_id, hid_t type_id, hid_t UNUSED space_id) { const H5T_t *type; /* Datatype */ - herr_t ret_value = TRUE; /* Return value */ + htri_t ret_value = TRUE; /* Return value */ FUNC_ENTER_NOAPI(H5Z_can_apply_nbit, FAIL) |