summaryrefslogtreecommitdiffstats
path: root/src/H5SM.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5SM.c')
-rw-r--r--src/H5SM.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/H5SM.c b/src/H5SM.c
index 31f0e10..6af4173 100644
--- a/src/H5SM.c
+++ b/src/H5SM.c
@@ -1364,16 +1364,13 @@ H5SM__write_mesg(H5F_t *f, H5O_t *open_oh, H5SM_index_header_t *header, hbool_t
HGOTO_ERROR(H5E_SOHM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for SOHM index")
if (defer) {
- htri_t bt2_find; /* Result from searching in the v2 B-tree */
-
/* If this returns 0, it means that the message wasn't found. */
/* If it return 1, set the heap_id in the shared struct. It will
* return a heap ID, since a message with a reference count greater
* than 1 is always shared in the heap.
*/
- if ((bt2_find = H5B2_find(bt2, &key, NULL, NULL)) < 0)
+ if (H5B2_find(bt2, &key, &found, NULL, NULL) < 0)
HGOTO_ERROR(H5E_SOHM, H5E_NOTFOUND, FAIL, "can't search for message in index")
- found = (hbool_t)bt2_find;
} /* end if */
else {
H5SM_incr_ref_opdata op_data;
@@ -2231,7 +2228,7 @@ H5SM_get_refcount(H5F_t *f, unsigned type_id, const H5O_shared_t *sh_mesg, hsize
message = list->messages[list_pos];
} /* end if */
else {
- htri_t msg_exists; /* Whether the message exists in the v2 B-tree */
+ hbool_t msg_exists; /* Whether the message exists in the v2 B-tree */
/* Index is a B-tree */
HDassert(header->index_type == H5SM_BTREE);
@@ -2241,7 +2238,8 @@ H5SM_get_refcount(H5F_t *f, unsigned type_id, const H5O_shared_t *sh_mesg, hsize
HGOTO_ERROR(H5E_SOHM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for SOHM index")
/* Look up the message in the v2 B-tree */
- if ((msg_exists = H5B2_find(bt2, &key, H5SM__get_refcount_bt2_cb, &message)) < 0)
+ msg_exists = FALSE;
+ if (H5B2_find(bt2, &key, &msg_exists, H5SM__get_refcount_bt2_cb, &message) < 0)
HGOTO_ERROR(H5E_SOHM, H5E_CANTGET, FAIL, "error finding message in index")
if (!msg_exists)
HGOTO_ERROR(H5E_SOHM, H5E_NOTFOUND, FAIL, "message not in index")