diff options
author | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2005-03-25 18:31:37 (GMT) |
---|---|---|
committer | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2005-03-25 18:31:37 (GMT) |
commit | 20f6e6203a637980e401d876914d41447f7487db (patch) | |
tree | d3824390c860fc95db955443de5ed5f55212eb28 /hl/src | |
parent | 705b9ec0c98ee78acbe4824c482f23b284dbd190 (diff) | |
download | hdf5-20f6e6203a637980e401d876914d41447f7487db.zip hdf5-20f6e6203a637980e401d876914d41447f7487db.tar.gz hdf5-20f6e6203a637980e401d876914d41447f7487db.tar.bz2 |
[svn-r10446] Purpose:
new test
Description:
added a test for a scalar scale
Solution:
Platforms tested:
linux
solaris
AIX
IRIX
Misc. update:
Diffstat (limited to 'hl/src')
-rw-r--r-- | hl/src/H5DS.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/hl/src/H5DS.c b/hl/src/H5DS.c index fbff253..b32387f 100644 --- a/hl/src/H5DS.c +++ b/hl/src/H5DS.c @@ -185,6 +185,10 @@ herr_t H5DSattach_scale(hid_t did, if ((rank=H5Sget_simple_extent_ndims(sid))<0) goto out; + /* scalar rank */ + if (rank==0) + rank=1; + /* close dataset space */ if (H5Sclose(sid)<0) return FAIL; @@ -1331,7 +1335,7 @@ out: * the string terminator is stored in the last position of the buffer to * properly terminate the string. * - * Return: size of name if found, Failure: FAIL + * Return: size of name if found, zero if not found, Failure: FAIL * * Programmer: pvn@ncsa.uiuc.edu * @@ -1381,7 +1385,7 @@ ssize_t H5DSget_scale_name(hid_t did, return FAIL; if (has_name == 0) - return FAIL; + return 0; /*------------------------------------------------------------------------- * open the attribute @@ -1400,7 +1404,7 @@ ssize_t H5DSget_scale_name(hid_t did, goto out; /* get the size */ - if ((nbytes = H5Tget_size(tid))<0) + if ((nbytes = H5Tget_size(tid))==0) goto out; /* allocate a temporary buffer */ |