summaryrefslogtreecommitdiffstats
path: root/src/H5Tpad.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Tpad.c')
-rw-r--r--src/H5Tpad.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/H5Tpad.c b/src/H5Tpad.c
index afceade..532a920 100644
--- a/src/H5Tpad.c
+++ b/src/H5Tpad.c
@@ -84,9 +84,9 @@ H5Tget_pad(hid_t type_id, H5T_pad_t *lsb/*out*/, H5T_pad_t *msb/*out*/)
/* Check args */
if (NULL == (dt = H5I_object_verify(type_id,H5I_DATATYPE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type");
- if (dt->parent)
+ while (dt->parent)
dt = dt->parent; /*defer to parent*/
- if (H5T_COMPOUND==dt->type || H5T_OPAQUE==dt->type || H5T_ARRAY==dt->type)
+ if (H5T_COMPOUND==dt->type || H5T_OPAQUE==dt->type)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "operation not defined for specified data type");
/* Get values */
@@ -135,9 +135,9 @@ H5Tset_pad(hid_t type_id, H5T_pad_t lsb, H5T_pad_t msb)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid pad type");
if (H5T_ENUM==dt->type && dt->u.enumer.nmembs>0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "operation not allowed after members are defined");
- if (dt->parent)
+ while (dt->parent)
dt = dt->parent; /*defer to parent*/
- if (H5T_COMPOUND==dt->type || H5T_OPAQUE==dt->type || H5T_ARRAY==dt->type)
+ if (H5T_COMPOUND==dt->type || H5T_OPAQUE==dt->type)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "operation not defined for specified data type");
/* Commit */