diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/H5ACprivate.h | 3 | ||||
-rw-r--r-- | src/H5B2cache.c | 8 | ||||
-rw-r--r-- | src/H5I.c | 8 | ||||
-rw-r--r-- | src/H5SL.c | 2 |
4 files changed, 11 insertions, 10 deletions
diff --git a/src/H5ACprivate.h b/src/H5ACprivate.h index cc669a7..a2224af 100644 --- a/src/H5ACprivate.h +++ b/src/H5ACprivate.h @@ -353,8 +353,7 @@ H5_DLL herr_t H5AC_insert_entry(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *typ H5_DLL herr_t H5AC_pin_protected_entry(void *thing); H5_DLL herr_t H5AC_create_flush_dependency(void *parent_thing, void *child_thing); H5_DLL void * H5AC_protect(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, - haddr_t addr, void *udata, - H5AC_protect_t rw); + haddr_t addr, void *udata, H5AC_protect_t rw); H5_DLL herr_t H5AC_resize_entry(void *thing, size_t new_size); H5_DLL herr_t H5AC_unpin_entry(void *thing); H5_DLL herr_t H5AC_destroy_flush_dependency(void *parent_thing, void *child_thing); diff --git a/src/H5B2cache.c b/src/H5B2cache.c index a48d3a8..1554501 100644 --- a/src/H5B2cache.c +++ b/src/H5B2cache.c @@ -193,12 +193,12 @@ H5B2__cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) /* Magic number */ if(HDmemcmp(p, H5B2_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) - HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, NULL, "wrong B-tree header signature") + HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, NULL, "wrong B-tree header signature") p += H5_SIZEOF_MAGIC; /* Version */ if(*p++ != H5B2_HDR_VERSION) - HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, NULL, "wrong B-tree header version") + HGOTO_ERROR(H5E_BTREE, H5E_BADRANGE, NULL, "wrong B-tree header version") /* B-tree class */ id = (H5B2_subid_t)*p++; @@ -532,12 +532,12 @@ H5B2__cache_internal_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) /* Magic number */ if(HDmemcmp(p, H5B2_INT_MAGIC, (size_t)H5_SIZEOF_MAGIC)) - HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, NULL, "wrong B-tree internal node signature") + HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, NULL, "wrong B-tree internal node signature") p += H5_SIZEOF_MAGIC; /* Version */ if(*p++ != H5B2_INT_VERSION) - HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, NULL, "wrong B-tree internal node version") + HGOTO_ERROR(H5E_BTREE, H5E_BADRANGE, NULL, "wrong B-tree internal node version") /* B-tree type */ if(*p++ != (uint8_t)udata->hdr->cls->id) @@ -562,9 +562,6 @@ H5I_clear_type(H5I_type_t type, hbool_t force, hbool_t app_ref) if(NULL == (cur = (H5I_id_info_t *)H5SL_item(curr_node))) HGOTO_ERROR(H5E_ATOM, H5E_CANTGET, FAIL, "can't get ID info for node") - /* Get the next node in the list */ - next_node = H5SL_next(curr_node); - /* * Do nothing to the object if the reference count is larger than * one and forcing is off. @@ -598,13 +595,16 @@ H5I_clear_type(H5I_type_t type, hbool_t force, hbool_t app_ref) } /* end else */ } /* end else */ + /* Get the next node in the list */ + next_node = H5SL_next(curr_node); + /* Check if we should delete this node or not */ if(delete_node) { /* Decrement the number of IDs in the type */ (type_ptr->id_count)--; /* Remove the node from the list */ - if(NULL == H5SL_remove(type_ptr->ids, cur)) + if(NULL == H5SL_remove(type_ptr->ids, &cur->id)) HGOTO_ERROR(H5E_ATOM, H5E_CANTDELETE, FAIL, "can't remove ID node from skip list") /* Free the node */ @@ -549,10 +549,12 @@ H5SL_init_interface(void) /* Allocate space for array of factories */ H5SL_fac_g = (H5FL_fac_head_t **)H5MM_malloc(sizeof(H5FL_fac_head_t *)); + HDassert(H5SL_fac_g); H5SL_fac_nalloc_g = 1; /* Initialize first factory */ H5SL_fac_g[0] = H5FL_fac_init(sizeof(H5SL_node_t *)); + HDassert(H5SL_fac_g[0]); H5SL_fac_nused_g = 1; FUNC_LEAVE_NOAPI(SUCCEED) |