summaryrefslogtreecommitdiffstats
path: root/fortran/src/H5_f.c
diff options
context:
space:
mode:
Diffstat (limited to 'fortran/src/H5_f.c')
-rw-r--r--fortran/src/H5_f.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fortran/src/H5_f.c b/fortran/src/H5_f.c
index 0277e5c..468debe 100644
--- a/fortran/src/H5_f.c
+++ b/fortran/src/H5_f.c
@@ -65,12 +65,6 @@ h5init_types_c(hid_t_f *types, hid_t_f *floatingtypes, hid_t_f *integertypes)
* Find the HDF5 type of the Fortran Integer KIND.
*/
- /* Initialized INTEGER KIND types to default to native integer */
- for (i = 0; i < 5; i++) {
- if ((types[i] = (hid_t_f)H5Tcopy(H5T_NATIVE_INT)) < 0)
- return ret_value;
- }
-
for (i = 0; i < H5_FORTRAN_NUM_INTEGER_KINDS; i++) {
if (IntKinds_SizeOf[i] == sizeof(char)) {
if ((types[i] = (hid_t_f)H5Tcopy(H5T_NATIVE_CHAR)) < 0)
@@ -96,6 +90,12 @@ h5init_types_c(hid_t_f *types, hid_t_f *floatingtypes, hid_t_f *integertypes)
} /*end else */
}
+ /* Initialized missing INTEGER KIND types to default to native integer */
+ for (i = H5_FORTRAN_NUM_INTEGER_KINDS; i < 5; i++) {
+ if ((types[i] = (hid_t_f)H5Tcopy(H5T_NATIVE_INT)) < 0)
+ return ret_value;
+ }
+
if (sizeof(int_f) == sizeof(int)) {
if ((types[5] = (hid_t_f)H5Tcopy(H5T_NATIVE_INT)) < 0)
return ret_value;