User: rhaas Date: 2012/05/16 11:16 PM
Modified: /trunk/src/nuc_eos/ readtable.c
Log: * close all HDF5 objects * check H5?close() return code * make file-local functions static
File Changes:
Directory: /trunk/src/nuc_eos/ ==============================
File [modified]: readtable.c Delta lines: +4 -4 =================================================================== --- trunk/src/nuc_eos/readtable.c 2012-04-16 17:39:54 UTC (rev 58) +++ trunk/src/nuc_eos/readtable.c 2012-05-17 04:16:18 UTC (rev 59) @@ -23,8 +23,8 @@ #fn_call, _error_code); \ } while (0)
-int file_is_readable(const char* filename); -int file_is_readable(const char* filename) +static int file_is_readable(const char* filename); +static int file_is_readable(const char* filename) { FILE* fp = NULL; fp = fopen(filename, "r"); @@ -38,7 +38,6 @@
// Cactus calls this function. It reads in the table and calls a fortran // function to setup values for the fortran eos module -void EOS_OMNI_ReadTable(CCTK_ARGUMENTS); void EOS_OMNI_ReadTable(CCTK_ARGUMENTS) { DECLARE_CCTK_PARAMETERS @@ -131,7 +130,8 @@ READ_EOS_HDF5("ye", ye, H5T_NATIVE_DOUBLE, H5S_ALL); READ_EOS_HDF5("energy_shift", &energy_shift, H5T_NATIVE_DOUBLE, H5S_ALL);
- H5Fclose(file); + HDF5_ERROR(H5Sclose(mem3)); + HDF5_ERROR(H5Fclose(file));
// Give all values to fortran - which will copy them until I can find out how // I can tell Fortran to use those pointers inside the module