diff options
author | Larry Knox <lrknox@hdfgroup.org> | 2020-11-03 20:52:09 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-03 20:52:09 (GMT) |
commit | 5b5a1a81029eb7bdc975beff5f18c9c440f5de56 (patch) | |
tree | d9a6f898e3072a0943b66fee564928536f1ed232 | |
parent | dc47bb7084d55993a0a6f3725dcf79d92d7f0e65 (diff) | |
parent | 0b6067574b673908c09dd9d487e0592103c828e4 (diff) | |
download | hdf5-5b5a1a81029eb7bdc975beff5f18c9c440f5de56.zip hdf5-5b5a1a81029eb7bdc975beff5f18c9c440f5de56.tar.gz hdf5-5b5a1a81029eb7bdc975beff5f18c9c440f5de56.tar.bz2 |
Merge pull request #72 from jhendersonHDF/develop
Change H5R__copy to not assume destination reference storage is initiā¦
-rw-r--r-- | src/H5Rint.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/H5Rint.c b/src/H5Rint.c index 8f3163a..60f8131 100644 --- a/src/H5Rint.c +++ b/src/H5Rint.c @@ -746,8 +746,10 @@ H5R__copy(const H5R_ref_priv_t *src_ref, H5R_ref_priv_t *dst_ref) dst_ref->info.obj.filename = NULL; /* Set location ID and hold reference to it */ - if (H5R__set_loc_id(dst_ref, src_ref->loc_id, TRUE, TRUE) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTSET, FAIL, "cannot set reference location ID") + dst_ref->loc_id = src_ref->loc_id; + if (H5I_inc_ref(dst_ref->loc_id, TRUE) < 0) + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTINC, FAIL, "incrementing location ID failed") + dst_ref->app_ref = TRUE; } done: |