diff options
author | Vailin Choi <vchoi@hdfgroup.org> | 2016-08-05 20:13:54 (GMT) |
---|---|---|
committer | Vailin Choi <vchoi@hdfgroup.org> | 2016-08-05 20:13:54 (GMT) |
commit | 4d358ef0afa1e9ffef8351031242710080389eff (patch) | |
tree | 8b38f574b7b55b38c5033459dfb9d3ab3c3ed342 /hl/src | |
parent | a4e4094c766348c296d0dd8e1af38e28492528bf (diff) | |
download | hdf5-4d358ef0afa1e9ffef8351031242710080389eff.zip hdf5-4d358ef0afa1e9ffef8351031242710080389eff.tar.gz hdf5-4d358ef0afa1e9ffef8351031242710080389eff.tar.bz2 |
[svn-r30262] Fix for HDFFV-9960: H5DOappend will not fail if a dataset has no append callback registered.
Tested on mayll, platypus, osx1010test, emu, moohan, kituo, ostrich, kite, quail.
Diffstat (limited to 'hl/src')
-rw-r--r-- | hl/src/H5DO.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/hl/src/H5DO.c b/hl/src/H5DO.c index bfadfaa..f59f2ca 100644 --- a/hl/src/H5DO.c +++ b/hl/src/H5DO.c @@ -165,7 +165,7 @@ H5DOappend(hid_t dset_id, hid_t dxpl_id, unsigned axis, size_t extension, created_dxpl = TRUE; } /* end if */ else if(TRUE != H5Pisa_class(dxpl_id, H5P_DATASET_XFER)) - goto done; + goto done; /* Get the dataspace of the dataset */ if(FAIL == (space_id = H5Dget_space(dset_id))) @@ -219,7 +219,8 @@ H5DOappend(hid_t dset_id, hid_t dxpl_id, unsigned axis, size_t extension, nelmts = (hsize_t)snelmts; /* create a memory space */ - mem_space_id = H5Screate_simple(1, &nelmts, NULL); + if(FAIL == (mem_space_id = H5Screate_simple(1, &nelmts, NULL))) + goto done; /* Write the data */ if(H5Dwrite(dset_id, memtype, mem_space_id, new_space_id, dxpl_id, buf) < 0) @@ -237,8 +238,10 @@ 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) + 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++) |