diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2003-05-19 19:18:17 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2003-05-19 19:18:17 (GMT) |
commit | 16b13faaac6a136dc4a0b45da01630c24d3fcc09 (patch) | |
tree | 7db4931238d4f4ed054b7aaf86b092c25995e7b9 | |
parent | eaf0b25546683a1e4283922b2edb2dbdb29e4705 (diff) | |
download | hdf5-16b13faaac6a136dc4a0b45da01630c24d3fcc09.zip hdf5-16b13faaac6a136dc4a0b45da01630c24d3fcc09.tar.gz hdf5-16b13faaac6a136dc4a0b45da01630c24d3fcc09.tar.bz2 |
[svn-r6898] Purpose:
Code cleanup
Description:
Improve error reporting for pixels per scanline check.
Platforms tested:
FreeBSD 4.8 (sleipnir)
h5committest not needed.
-rw-r--r-- | src/H5Pdcpl.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c index d52c3cf..2c9a377 100644 --- a/src/H5Pdcpl.c +++ b/src/H5Pdcpl.c @@ -1011,8 +1011,10 @@ H5Pset_szip(hid_t plist_id, unsigned options_mask, unsigned pixels_per_block) H5TRACE3("e","iIuIu",plist_id,options_mask,pixels_per_block); /* Check arguments */ - if ((pixels_per_block%2)==1 || pixels_per_block>H5_SZIP_MAX_PIXELS_PER_BLOCK) + if ((pixels_per_block%2)==1) HGOTO_ERROR (H5E_ARGS, H5E_BADVALUE, FAIL, "pixels_per_block is not even"); + if (pixels_per_block>H5_SZIP_MAX_PIXELS_PER_BLOCK) + HGOTO_ERROR (H5E_ARGS, H5E_BADVALUE, FAIL, "pixels_per_block is too large"); /* Get the plist structure */ if(NULL == (plist = H5P_object_verify(plist_id,H5P_DATASET_CREATE))) |