diff options
author | Raymond Lu <songyulu@hdfgroup.org> | 2009-07-14 17:04:04 (GMT) |
---|---|---|
committer | Raymond Lu <songyulu@hdfgroup.org> | 2009-07-14 17:04:04 (GMT) |
commit | a739b62eccb9748d7089d6db527fed7159ebe3b1 (patch) | |
tree | b8e16ca41ce3ce26f43e47910462b3a2165f259d /src/H5T.c | |
parent | 2228b81fa28f583b2358a479242329e1ba969eda (diff) | |
download | hdf5-a739b62eccb9748d7089d6db527fed7159ebe3b1.zip hdf5-a739b62eccb9748d7089d6db527fed7159ebe3b1.tar.gz hdf5-a739b62eccb9748d7089d6db527fed7159ebe3b1.tar.bz2 |
[svn-r17182] In my last round of checkin (r17177), I forgot to clean up some code. I'm checking in
the fix now. Another minor fix - The way that H5Tset_size checks whether the datatype
is a string wasn't correct. I changed it to use the macro H5T_IS_STRING.
Tested on jam, smirom, and linew.
Diffstat (limited to 'src/H5T.c')
-rw-r--r-- | src/H5T.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2120,7 +2120,7 @@ H5Tset_size(hid_t type_id, size_t size) HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, FAIL, "datatype is read-only") if(size <= 0 && size != H5T_VARIABLE) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "size must be positive") - if(size == H5T_VARIABLE && dt->shared->type != H5T_STRING) + if(size == H5T_VARIABLE && !H5T_IS_STRING(dt->shared)) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "only strings may be variable length") if(H5T_ENUM == dt->shared->type && dt->shared->u.enumer.nmembs > 0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "operation not allowed after members are defined") |