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/h5repack/h5repack_copy.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/h5repack/h5repack_copy.c')
-rw-r--r-- | tools/h5repack/h5repack_copy.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tools/h5repack/h5repack_copy.c b/tools/h5repack/h5repack_copy.c index b165dc7..4e2e036 100644 --- a/tools/h5repack/h5repack_copy.c +++ b/tools/h5repack/h5repack_copy.c @@ -650,7 +650,7 @@ int do_copy_objects(hid_t fidin, { int j; - + if((dset_in = H5Dopen2(fidin, travt->objs[i].name, H5P_DEFAULT)) < 0) goto error; if((f_space_id = H5Dget_space(dset_in)) < 0) @@ -790,8 +790,12 @@ int do_copy_objects(hid_t fidin, */ sm_nbytes = p_type_nbytes; - for (k = rank; k > 0; --k) { - sm_size[k - 1] = MIN(dims[k - 1], H5TOOLS_BUFSIZE / sm_nbytes); + for (k = rank; k > 0; --k) + { + hsize_t size = H5TOOLS_BUFSIZE / sm_nbytes; + if ( size == 0) /* datum size > H5TOOLS_BUFSIZE */ + size = 1; + sm_size[k - 1] = MIN(dims[k - 1], size); sm_nbytes *= sm_size[k - 1]; assert(sm_nbytes > 0); } |