From 16b13faaac6a136dc4a0b45da01630c24d3fcc09 Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Mon, 19 May 2003 14:18:17 -0500 Subject: [svn-r6898] Purpose: Code cleanup Description: Improve error reporting for pixels per scanline check. Platforms tested: FreeBSD 4.8 (sleipnir) h5committest not needed. --- src/H5Pdcpl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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))) -- cgit v0.12