diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2009-03-26 18:31:00 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2009-03-26 18:31:00 (GMT) |
commit | 505b31ee08bfd3efc62df84e00602a9fd6c46a4f (patch) | |
tree | 77c1e8cd2a59bfb655f789fd6ddac4e74b4fe5c9 /tools/lib/h5diff_dset.c | |
parent | 5f2e591745df8a05950c07e4c86de00d6678828e (diff) | |
download | hdf5-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.c | 8 |
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); } |