diff options
author | Jerome Soumagne <jsoumagne@hdfgroup.org> | 2016-03-07 22:35:43 (GMT) |
---|---|---|
committer | Jerome Soumagne <jsoumagne@hdfgroup.org> | 2016-11-29 23:42:32 (GMT) |
commit | b4aa4a88b1c2c4e4af54668e77847ec1648ac13e (patch) | |
tree | 4a1126d7511d4f5d6e2dbcd7ed3ed4baf6554b0e /src | |
parent | 7c1cd40d7eaf67b0560765dd3ec032f62cc11c84 (diff) | |
download | hdf5-b4aa4a88b1c2c4e4af54668e77847ec1648ac13e.zip hdf5-b4aa4a88b1c2c4e4af54668e77847ec1648ac13e.tar.gz hdf5-b4aa4a88b1c2c4e4af54668e77847ec1648ac13e.tar.bz2 |
Some more fixes to H5R to separate int/ext refs
Diffstat (limited to 'src')
-rw-r--r-- | src/H5R.c | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -1823,7 +1823,6 @@ done: ssize_t H5R__get_attr_name(H5F_t *f, href_t _ref, char *name, size_t size) { - H5O_loc_t oloc; /* Object location describing object for reference */ ssize_t ret_value = -1; /* Return value */ const uint8_t *p = NULL; /* Pointer to reference to decode */ size_t attr_name_len; /* Length of the attribute name */ @@ -1833,14 +1832,9 @@ H5R__get_attr_name(H5F_t *f, href_t _ref, char *name, size_t size) FUNC_ENTER_NOAPI_NOINIT_NOERR /* Check args */ - HDassert(f); HDassert(ref); HDassert((ref->ref_type == H5R_ATTR) || (ref->ref_type == H5R_EXT_ATTR)); - /* Initialize the object location */ - H5O_loc_reset(&oloc); - oloc.file = f; - /* Point to reference buffer now */ p = (const uint8_t *)ref->ref.serial.buf; @@ -1861,6 +1855,14 @@ H5R__get_attr_name(H5F_t *f, href_t _ref, char *name, size_t size) /* Skip the path name */ p += pathname_len; } else { + H5O_loc_t oloc; /* Object location describing object for reference */ + + HDassert(f); + + /* Initialize the object location */ + H5O_loc_reset(&oloc); + oloc.file = f; + /* Get the object oid for the dataset */ H5F_addr_decode(oloc.file, &p, &(oloc.addr)); } |