summaryrefslogtreecommitdiffstats
path: root/src/H5Tcset.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2003-09-02 15:04:36 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2003-09-02 15:04:36 (GMT)
commit32a666f65243a0583be867935b892dd4ae13d1f4 (patch)
tree0378b28295a0eb21d6199ae84d4d023646d44fa2 /src/H5Tcset.c
parent38d6179b319519ece95e6af9da1720cd63b0e4ac (diff)
downloadhdf5-32a666f65243a0583be867935b892dd4ae13d1f4.zip
hdf5-32a666f65243a0583be867935b892dd4ae13d1f4.tar.gz
hdf5-32a666f65243a0583be867935b892dd4ae13d1f4.tar.bz2
[svn-r7438] Purpose:
Code cleanup Description: More de-linting... Platforms tested: FreeBSD 4.9 (sleipnir) too small to need h5committest
Diffstat (limited to 'src/H5Tcset.c')
-rw-r--r--src/H5Tcset.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/H5Tcset.c b/src/H5Tcset.c
index 6814b9b..ec51af8 100644
--- a/src/H5Tcset.c
+++ b/src/H5Tcset.c
@@ -89,15 +89,13 @@ H5Tget_cset(hid_t type_id)
while (dt->parent && !H5T_IS_STRING(dt))
dt = dt->parent; /*defer to parent*/
if (!H5T_IS_STRING(dt))
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, H5T_CSET_ERROR, "operation not defined for data type class");
+ HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, H5T_CSET_ERROR, "operation not defined for data type class");
/* result */
- if(H5T_STRING == dt->type)
+ if(H5T_IS_FIXED_STRING(dt))
ret_value = dt->u.atomic.u.s.cset;
- else if(H5T_VLEN == dt->type && H5T_VLEN_STRING == dt->u.vlen.type)
+ else
ret_value = dt->u.vlen.cset;
- else
- HGOTO_ERROR(H5E_DATATYPE, H5E_BADVALUE, H5T_CSET_ERROR, "can't get cset info");
done:
FUNC_LEAVE_API(ret_value);
@@ -141,15 +139,13 @@ H5Tset_cset(hid_t type_id, H5T_cset_t cset)
while (dt->parent && !H5T_IS_STRING(dt))
dt = dt->parent; /*defer to parent*/
if (!H5T_IS_STRING(dt))
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "operation not defined for data type class");
+ HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "operation not defined for data type class");
/* Commit */
- if(H5T_STRING == dt->type)
+ if(H5T_IS_FIXED_STRING(dt))
dt->u.atomic.u.s.cset = cset;
- else if(H5T_VLEN == dt->type && H5T_VLEN_STRING == dt->u.vlen.type)
+ else
dt->u.vlen.cset = cset;
- else
- HGOTO_ERROR(H5E_DATATYPE, H5E_BADVALUE, FAIL, "can't set cset info");
done:
FUNC_LEAVE_API(ret_value);