summaryrefslogtreecommitdiffstats
path: root/fortran/src/H5If.c
diff options
context:
space:
mode:
authorScot Breitenfeld <brtnfld@hdfgroup.org>2008-04-30 19:51:13 (GMT)
committerScot Breitenfeld <brtnfld@hdfgroup.org>2008-04-30 19:51:13 (GMT)
commitaec106e324ce20e5efb725c25a6a333c7970127b (patch)
tree234df369115a46b08037c5f385061cf58823e497 /fortran/src/H5If.c
parent5773fd34bc5adf59b4530d95ac9f0c0585902803 (diff)
downloadhdf5-aec106e324ce20e5efb725c25a6a333c7970127b.zip
hdf5-aec106e324ce20e5efb725c25a6a333c7970127b.tar.gz
hdf5-aec106e324ce20e5efb725c25a6a333c7970127b.tar.bz2
[svn-r14903] Undoing change committed in r14902.
Diffstat (limited to 'fortran/src/H5If.c')
-rw-r--r--fortran/src/H5If.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/fortran/src/H5If.c b/fortran/src/H5If.c
index b4c7660..d948259 100644
--- a/fortran/src/H5If.c
+++ b/fortran/src/H5If.c
@@ -54,11 +54,7 @@ nh5iget_type_c (hid_t_f *obj_id, int_f *type)
* Returns: length of the name on success, -1 on failure
* Programmer: Elena Pourmal
* Wednesday, March 12, 2003
- * Modifications:
- * Changed the size of c_buf_size to c_buf_size + 1, which
- * fixes the problem of truncating the string by 1 if the
- * exact size of the string (buf_size) is passed in.
- * M.S. Breitenfeld, April 21, 2008
+ * Modifications:
*---------------------------------------------------------------------------*/
int_f
nh5iget_name_c(hid_t_f *obj_id, _fcd buf, size_t_f *buf_size, size_t_f *name_size)
@@ -72,8 +68,8 @@ nh5iget_name_c(hid_t_f *obj_id, _fcd buf, size_t_f *buf_size, size_t_f *name_siz
/*
* Allocate buffer to hold name of an attribute
*/
- c_buf_size = (size_t)*buf_size +1;
- c_buf = (char *)HDmalloc(c_buf_size);
+ c_buf_size = (size_t)*buf_size;
+ c_buf = (char *)HDmalloc(c_buf_size +1);
if (c_buf == NULL) return ret_value;
/*
@@ -86,7 +82,7 @@ nh5iget_name_c(hid_t_f *obj_id, _fcd buf, size_t_f *buf_size, size_t_f *name_siz
/*
* Convert C name to FORTRAN and place it in the given buffer
*/
- HD5packFstring(c_buf, _fcdtocp(buf), c_buf_size-1);
+ HD5packFstring(c_buf, _fcdtocp(buf), c_buf_size);
*name_size = (size_t_f)c_size;
ret_value = 0;