summaryrefslogtreecommitdiffstats
path: root/src/H5HL.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5HL.c')
-rw-r--r--src/H5HL.c25
1 files changed, 10 insertions, 15 deletions
diff --git a/src/H5HL.c b/src/H5HL.c
index e45b617..bf402b0 100644
--- a/src/H5HL.c
+++ b/src/H5HL.c
@@ -170,7 +170,7 @@ H5HL_create(H5F_t *f, hid_t dxpl_id, size_t size_hint, haddr_t *addr_p/*out*/)
}
/* add to cache */
- heap->cache_info.dirty = 1;
+ heap->cache_info.is_dirty = TRUE;
if (H5AC_set(f, dxpl_id, H5AC_LHEAP, *addr_p, heap) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "unable to cache heap");
@@ -549,7 +549,7 @@ H5HL_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5HL_t *heap)
assert(H5F_addr_defined(addr));
assert(heap);
- if (heap->cache_info.dirty) {
+ if (heap->cache_info.is_dirty) {
haddr_t hdr_end_addr;
size_t sizeof_hdr = H5HL_SIZEOF_HDR(f); /* cache H5HL header size for file */
@@ -578,7 +578,7 @@ H5HL_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5HL_t *heap)
HGOTO_ERROR(H5E_HEAP, H5E_WRITEERROR, FAIL, "unable to write heap data to file")
}
- heap->cache_info.dirty = 0;
+ heap->cache_info.is_dirty = FALSE;
}
/* Should we destroy the memory version? */
@@ -618,7 +618,7 @@ H5HL_dest(H5F_t UNUSED *f, H5HL_t *heap)
assert(heap);
/* Verify that node is clean */
- assert (heap->cache_info.dirty==0);
+ assert (heap->cache_info.is_dirty==FALSE);
if(heap->chunk)
heap->chunk = H5FL_BLK_FREE(heap_chunk,heap->chunk);
@@ -659,7 +659,7 @@ H5HL_clear(H5F_t *f, H5HL_t *heap, hbool_t destroy)
assert(heap);
/* Mark heap as clean */
- heap->cache_info.dirty = 0;
+ heap->cache_info.is_dirty = FALSE;
if (destroy)
if (H5HL_dest(f, heap) < 0)
@@ -688,9 +688,7 @@ done:
static herr_t
H5HL_compute_size(H5F_t *f, H5HL_t *heap, size_t *size_ptr)
{
- herr_t ret_value = SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5HL_compute_size, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HL_compute_size);
/* check arguments */
HDassert(f);
@@ -699,10 +697,7 @@ H5HL_compute_size(H5F_t *f, H5HL_t *heap, size_t *size_ptr)
*size_ptr = H5HL_SIZEOF_HDR(f) + heap->disk_alloc;
-done:
-
- FUNC_LEAVE_NOAPI(ret_value)
-
+ FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5HL_compute_size() */
@@ -961,7 +956,7 @@ H5HL_insert(H5F_t *f, hid_t dxpl_id, haddr_t addr, size_t buf_size, const void *
if (NULL == (heap = H5AC_protect(f, dxpl_id, H5AC_LHEAP, addr, NULL, NULL, H5AC_WRITE)))
HGOTO_ERROR(H5E_HEAP, H5E_PROTECT, (size_t)(-1), "unable to load heap");
- ++heap->cache_info.dirty;
+ heap->cache_info.is_dirty=TRUE;
/* Cache this for later */
sizeof_hdr= H5HL_SIZEOF_HDR(f);
@@ -1134,7 +1129,7 @@ H5HL_write(H5F_t *f, hid_t dxpl_id, haddr_t addr, size_t offset, size_t size, co
assert(offset < heap->mem_alloc);
assert(offset + size <= heap->mem_alloc);
- ++heap->cache_info.dirty;
+ heap->cache_info.is_dirty=TRUE;
HDmemcpy(heap->chunk + H5HL_SIZEOF_HDR(f) + offset, buf, size);
done:
@@ -1200,7 +1195,7 @@ H5HL_remove(H5F_t *f, hid_t dxpl_id, haddr_t addr, size_t offset, size_t size)
assert(offset + size <= heap->mem_alloc);
fl = heap->freelist;
- ++heap->cache_info.dirty;
+ heap->cache_info.is_dirty=TRUE;
/*
* Check if this chunk can be prepended or appended to an already