diff options
author | Scot Breitenfeld <brtnfld@hdfgroup.org> | 2013-02-11 02:06:01 (GMT) |
---|---|---|
committer | Scot Breitenfeld <brtnfld@hdfgroup.org> | 2013-02-11 02:06:01 (GMT) |
commit | 871b69723e764114578c2c88f125d8ce6ce57597 (patch) | |
tree | 8db4347ca7b4c49d7492f4a5e5fd1f5cba4c8857 /hl/fortran | |
parent | 944f0399ac73a622dcfb03c42dbfad4ecc2948ed (diff) | |
download | hdf5-871b69723e764114578c2c88f125d8ce6ce57597.zip hdf5-871b69723e764114578c2c88f125d8ce6ce57597.tar.gz hdf5-871b69723e764114578c2c88f125d8ce6ce57597.tar.bz2 |
[svn-r23241] Fix for: HDFFV-7596 H5DSget_scale returns size that includes NULL termination and H5DSget_label returns size
Updated tests.
Tested: jam( gnu, intel)
Diffstat (limited to 'hl/fortran')
-rw-r--r-- | hl/fortran/src/H5DSfc.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/hl/fortran/src/H5DSfc.c b/hl/fortran/src/H5DSfc.c index 3135cfa..2e38939 100644 --- a/hl/fortran/src/H5DSfc.c +++ b/hl/fortran/src/H5DSfc.c @@ -331,12 +331,8 @@ nh5dsget_scale_name_c(hid_t_f *did, _fcd name, size_t_f *size) /* * Convert C name to FORTRAN and place it in the given buffer */ - if(size_c != 0) { - HD5packFstring(c_scale_name, _fcdtocp(name), (size_t)*size); - *size = (size_t_f)size_c-1; /* (-1) because we don't include the NULL ending in the length*/ - } else { - *size = (size_t_f)size_c; /* if NULL then no name was found */ - } + HD5packFstring(c_scale_name, _fcdtocp(name), (size_t)*size); + *size = (size_t_f)size_c; done: if(c_scale_name) HDfree(c_scale_name); |