diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2013-05-21 17:30:54 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2013-05-21 17:30:54 (GMT) |
commit | 424a41f878b9ac91f9411dcabc1b8358c7634ea1 (patch) | |
tree | 5361a19a29d57982f7db4e9c5206c6c45bc1cbca /src/H5F.c | |
parent | 7a3f473c04684c756c5398878b8b715320af94c1 (diff) | |
download | hdf5-424a41f878b9ac91f9411dcabc1b8358c7634ea1.zip hdf5-424a41f878b9ac91f9411dcabc1b8358c7634ea1.tar.gz hdf5-424a41f878b9ac91f9411dcabc1b8358c7634ea1.tar.bz2 |
[svn-r23713] Description:
Clean up warnings, switch library code to use Standard C/POSIX wrapper
macros, remove internal calls to API routines, update checkapi and checkposix
scripts.
Tested on:
Mac OSX/64 10.8.3 (amazon) w/C++ & FORTRAN
Big-Endian Linux/64 (ostrich)
Diffstat (limited to 'src/H5F.c')
-rw-r--r-- | src/H5F.c | 21 |
1 files changed, 12 insertions, 9 deletions
@@ -2369,8 +2369,10 @@ H5F_build_actual_name(const H5F_t *f, const H5P_genplist_t *fapl, const char *na } /* end else */ done: - if(new_fapl_id > 0 && H5Pclose(new_fapl_id) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEOBJ, FAIL, "can't close duplicated FAPL") + /* Close the property list */ + if(new_fapl_id > 0) + if(H5I_dec_app_ref(new_fapl_id) < 0) + HDONE_ERROR(H5E_FILE, H5E_CANTCLOSEOBJ, FAIL, "can't close duplicated FAPL") FUNC_LEAVE_NOAPI(ret_value) } /* H5F_build_actual_name() */ @@ -2597,16 +2599,15 @@ done: * david.pitt@bigpond.com * Apr 27, 2004 * - * Modifications: - * *------------------------------------------------------------------------- */ herr_t H5Fget_filesize(hid_t file_id, hsize_t *size) { - H5F_t *file; /* File object for file ID */ - haddr_t eof; /* End of file address */ - herr_t ret_value = SUCCEED; /* Return value */ + H5F_t *file; /* File object for file ID */ + haddr_t eof; /* End of file address */ + haddr_t base_addr; /* Base address for the file */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) H5TRACE2("e", "i*h", file_id, size); @@ -2616,10 +2617,12 @@ H5Fget_filesize(hid_t file_id, hsize_t *size) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a file ID") /* Go get the actual file size */ - if(HADDR_UNDEF == (eof = H5FDget_eof(file->shared->lf))) + if(HADDR_UNDEF == (eof = H5FD_get_eof(file->shared->lf))) HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get file size") + base_addr = H5FD_get_base_addr(file->shared->lf); - *size = (hsize_t)eof; + if(size) + *size = (hsize_t)(eof + base_addr); /* Convert relative base address for file to absolute address */ done: FUNC_LEAVE_API(ret_value) |