summaryrefslogtreecommitdiffstats
path: root/src/H5Topaque.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Topaque.c')
-rw-r--r--src/H5Topaque.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/H5Topaque.c b/src/H5Topaque.c
index 17f4e36..2697178 100644
--- a/src/H5Topaque.c
+++ b/src/H5Topaque.c
@@ -83,6 +83,8 @@ H5Tset_tag(hid_t type_id, const char *tag)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type");
if (H5T_STATE_TRANSIENT!=dt->state)
HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, FAIL, "data type is read-only");
+ while (dt->parent)
+ dt = dt->parent; /*defer to parent*/
if (H5T_OPAQUE!=dt->type)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an opaque data type");
if (!tag)
@@ -123,8 +125,7 @@ H5Tget_tag(hid_t type_id)
/* Check args */
if (NULL == (dt = H5I_object_verify(type_id,H5I_DATATYPE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a data type");
-
- if (dt->parent)
+ while (dt->parent)
dt = dt->parent; /*defer to parent*/
if (H5T_OPAQUE != dt->type)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "operation not defined for data type class");