diff options
Diffstat (limited to 'src/H5R.c')
-rw-r--r-- | src/H5R.c | 23 |
1 files changed, 14 insertions, 9 deletions
@@ -159,25 +159,30 @@ done: int H5R_term_interface(void) { - int n=0; + int n = 0; FUNC_ENTER_NOAPI_NOINIT_NOERR if (H5_interface_initialize_g) { - if ((n=H5I_nmembers(H5I_REFERENCE))) { - H5I_clear_type(H5I_REFERENCE, FALSE, FALSE); - } else { + if(H5I_nmembers(H5I_REFERENCE) > 0) { + (void)H5I_clear_type(H5I_REFERENCE, FALSE, FALSE); + n++; /*H5I*/ + } /* end if */ + else { /* Close deprecated interface */ n += H5R__term_deprec_interface(); - H5I_dec_type_ref(H5I_REFERENCE); + /* Destroy the reference id group */ + (void)H5I_dec_type_ref(H5I_REFERENCE); + n++; /*H5I*/ + + /* Mark closed */ H5_interface_initialize_g = 0; - n = 1; /*H5I*/ - } - } + } /* end else */ + } /* end if */ FUNC_LEAVE_NOAPI(n) -} +} /* end H5R_term_interface() */ /*-------------------------------------------------------------------------- |