summaryrefslogtreecommitdiffstats
path: root/src/H5Iint.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Iint.c')
-rw-r--r--src/H5Iint.c41
1 files changed, 16 insertions, 25 deletions
diff --git a/src/H5Iint.c b/src/H5Iint.c
index 86a2810..1ea2ad7 100644
--- a/src/H5Iint.c
+++ b/src/H5Iint.c
@@ -85,9 +85,6 @@ static int H5I__find_id_cb(void *_item, void *_key, void *_udata);
/* Package Variables */
/*********************/
-/* Package initialization variable */
-hbool_t H5_PKG_INIT_VAR = FALSE;
-
/* Declared extern in H5Ipkg.h and documented there */
H5I_type_info_t *H5I_type_info_array_g[H5I_MAX_NUM_TYPES];
int H5I_next_type_g = (int)H5I_NTYPES;
@@ -127,30 +124,24 @@ H5I_term_package(void)
FUNC_ENTER_NOAPI_NOINIT_NOERR
- if (H5_PKG_INIT_VAR) {
- H5I_type_info_t *type_info = NULL; /* Pointer to ID type */
- int i;
-
- /* Count the number of types still in use */
- for (i = 0; i < H5I_next_type_g; i++)
- if ((type_info = H5I_type_info_array_g[i]) && type_info->hash_table)
+ H5I_type_info_t *type_info = NULL; /* Pointer to ID type */
+ int i;
+
+ /* Count the number of types still in use */
+ for (i = 0; i < H5I_next_type_g; i++)
+ if ((type_info = H5I_type_info_array_g[i]) && type_info->hash_table)
+ in_use++;
+
+ /* If no types are still being used then clean up */
+ if (0 == in_use) {
+ for (i = 0; i < H5I_next_type_g; i++) {
+ type_info = H5I_type_info_array_g[i];
+ if (type_info) {
+ HDassert(NULL == type_info->hash_table);
+ type_info = H5MM_xfree(type_info);
+ H5I_type_info_array_g[i] = NULL;
in_use++;
-
- /* If no types are still being used then clean up */
- if (0 == in_use) {
- for (i = 0; i < H5I_next_type_g; i++) {
- type_info = H5I_type_info_array_g[i];
- if (type_info) {
- HDassert(NULL == type_info->hash_table);
- type_info = H5MM_xfree(type_info);
- H5I_type_info_array_g[i] = NULL;
- in_use++;
- }
}
-
- /* Mark interface closed */
- if (0 == in_use)
- H5_PKG_INIT_VAR = FALSE;
}
}