diff options
Diffstat (limited to 'fortran/src/H5Lf.c')
-rw-r--r-- | fortran/src/H5Lf.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/fortran/src/H5Lf.c b/fortran/src/H5Lf.c index 7efa10a..6523ab4 100644 --- a/fortran/src/H5Lf.c +++ b/fortran/src/H5Lf.c @@ -677,9 +677,9 @@ done: /****if* H5Lf/h5lget_name_by_idx_c * NAME - * h5lget_name_by_idx_c + * h5lget_name_by_idx_c * PURPOSE - * Call H5Lget_name_by_idx + * Call H5Lget_name_by_idx * INPUTS * * loc_id - File or group identifier specifying location of subject group @@ -694,10 +694,10 @@ done: * name - Buffer in which link value is returned * size - The size of the link name on success * RETURNS - * 0 on success, -1 on failure + * 0 on success, -1 on failure * AUTHOR * M. Scot Breitenfeld - * March 10, 2008 + * March 10, 2008 * SOURCE */ int_f @@ -706,9 +706,10 @@ nh5lget_name_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, size_t_f *size, _fcd name, hid_t_f *lapl_id) /******/ { - char *c_group_name = NULL; /* Buffer to hold C string */ + char *c_group_name = NULL; /* Buffer to hold C string */ char *c_name = NULL; /* Buffer to hold C string */ size_t c_size; + ssize_t c_size_link; int_f ret_value = 0; /* Return value */ /* @@ -725,10 +726,12 @@ nh5lget_name_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, if(NULL == (c_name = (char *)HDmalloc(c_size))) HGOTO_DONE(FAIL) - if((*size = (size_t_f)H5Lget_name_by_idx((hid_t)*loc_id, c_group_name, (H5_index_t)*index_field, + if((c_size_link = H5Lget_name_by_idx((hid_t)*loc_id, c_group_name, (H5_index_t)*index_field, (H5_iter_order_t)*order, (hsize_t)*n,c_name, c_size, (hid_t)*lapl_id)) < 0) HGOTO_DONE(FAIL) + *size = (size_t_f)c_size_link; + /* * Convert C name to FORTRAN and place it in the given buffer */ |