diff options
author | Vailin Choi <vchoi@hdfgroup.org> | 2016-08-14 23:02:49 (GMT) |
---|---|---|
committer | Vailin Choi <vchoi@hdfgroup.org> | 2016-08-14 23:02:49 (GMT) |
commit | 197b29ced6edb455ebac3d78f916d763a58a0d72 (patch) | |
tree | 47706f6892a151ae0c1bd815a43d19a89c393db7 | |
parent | f40381b0eab242182a02b0bb97aed88b37095086 (diff) | |
download | hdf5-197b29ced6edb455ebac3d78f916d763a58a0d72.zip hdf5-197b29ced6edb455ebac3d78f916d763a58a0d72.tar.gz hdf5-197b29ced6edb455ebac3d78f916d763a58a0d72.tar.bz2 |
[svn-r30289] Fix for HDFFV-9960 H5DOappend without append callback.
This is the second part of the fix--see crucible review HDF5-383.
Tested on mayll, platypus, osx1010test, emu, kituo, kite, quail, moohan, ostrich.
-rw-r--r-- | hl/src/H5DO.c | 38 |
1 files changed, 18 insertions, 20 deletions
diff --git a/hl/src/H5DO.c b/hl/src/H5DO.c index f59f2ca..e2b436a 100644 --- a/hl/src/H5DO.c +++ b/hl/src/H5DO.c @@ -238,26 +238,24 @@ H5DOappend(hid_t dset_id, hid_t dxpl_id, unsigned axis, size_t extension, goto done; /* No boundary for this axis */ - if(boundary[axis] == 0) { - ret_value = SUCCEED; - goto done; - } - - /* Determine whether a boundary is hit or not */ - for(k = start[axis]; k < size[axis]; k++) - if(!((k + 1) % boundary[axis])) { - hit = TRUE; - break; - } - - if(hit) { /* Hit the boundary */ - /* Invoke callback if there is one */ - if(append_cb && append_cb(dset_id, size, udata) < 0) - goto done; - - /* Do a dataset flush */ - if(H5Dflush(dset_id) < 0) - goto done; + if(boundary[axis] != 0) { + + /* Determine whether a boundary is hit or not */ + for(k = start[axis]; k < size[axis]; k++) + if(!((k + 1) % boundary[axis])) { + hit = TRUE; + break; + } + + if(hit) { /* Hit the boundary */ + /* Invoke callback if there is one */ + if(append_cb && append_cb(dset_id, size, udata) < 0) + goto done; + + /* Do a dataset flush */ + if(H5Dflush(dset_id) < 0) + goto done; + } /* end if */ } /* end if */ /* Indicate success */ |