summaryrefslogtreecommitdiffstats
path: root/tools/lib/h5diff_dset.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2009-03-26 18:31:00 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2009-03-26 18:31:00 (GMT)
commit505b31ee08bfd3efc62df84e00602a9fd6c46a4f (patch)
tree77c1e8cd2a59bfb655f789fd6ddac4e74b4fe5c9 /tools/lib/h5diff_dset.c
parent5f2e591745df8a05950c07e4c86de00d6678828e (diff)
downloadhdf5-505b31ee08bfd3efc62df84e00602a9fd6c46a4f.zip
hdf5-505b31ee08bfd3efc62df84e00602a9fd6c46a4f.tar.gz
hdf5-505b31ee08bfd3efc62df84e00602a9fd6c46a4f.tar.bz2
[svn-r16619] Description:
Bring r16606:16618 from trunk to the revise_chunks branch. Tested on: FreeBSD/32 6.3 (duty) h5committest not necessary on this branch
Diffstat (limited to 'tools/lib/h5diff_dset.c')
-rw-r--r--tools/lib/h5diff_dset.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/lib/h5diff_dset.c b/tools/lib/h5diff_dset.c
index 4826a7f..a295585 100644
--- a/tools/lib/h5diff_dset.c
+++ b/tools/lib/h5diff_dset.c
@@ -452,8 +452,12 @@ hsize_t diff_datasetid( hid_t did1,
*/
sm_nbytes = p_type_nbytes;
- for (i = rank1; i > 0; --i) {
- sm_size[i - 1] = MIN(dims1[i - 1], H5TOOLS_BUFSIZE / sm_nbytes);
+ for (i = rank1; i > 0; --i)
+ {
+ hsize_t size = H5TOOLS_BUFSIZE / sm_nbytes;
+ if ( size == 0) /* datum size > H5TOOLS_BUFSIZE */
+ size = 1;
+ sm_size[i - 1] = MIN(dims1[i - 1], size);
sm_nbytes *= sm_size[i - 1];
assert(sm_nbytes > 0);
}