diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2023-09-05 21:52:30 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-05 21:52:30 (GMT) |
commit | 8253ab9ebf6a082dc07eb931f27b169d6a45d577 (patch) | |
tree | 47630856491e54f5d28e1608ffa5e2f976dc9c95 /src/H5HL.c | |
parent | 920869796031ed4ee9c1fbea8aaccda3592a88b3 (diff) | |
download | hdf5-8253ab9ebf6a082dc07eb931f27b169d6a45d577.zip hdf5-8253ab9ebf6a082dc07eb931f27b169d6a45d577.tar.gz hdf5-8253ab9ebf6a082dc07eb931f27b169d6a45d577.tar.bz2 |
Convert hbool_t --> bool in src (#3496)
* hbool_t --> bool in src
* Does not remove TRUE/FALSE
* Public header files are unchanged
* Public API calls are unchanged
* TRUE/FALSE --> true/false in src
* Add deprecation notice for hbool_t
Diffstat (limited to 'src/H5HL.c')
-rw-r--r-- | src/H5HL.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -121,7 +121,7 @@ H5HL_create(H5F_t *f, size_t size_hint, haddr_t *addr_p /*out*/) HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "unable to allocate file memory"); /* Initialize info */ - heap->single_cache_obj = TRUE; + heap->single_cache_obj = true; heap->dblk_addr = heap->prfx_addr + (hsize_t)heap->prfx_size; heap->dblk_size = size_hint; if (size_hint) @@ -522,7 +522,7 @@ H5HL_insert(H5F_t *f, H5HL_t *heap, size_t buf_size, const void *buf, size_t *of H5HL_free_t *fl = NULL, *last_fl = NULL; size_t need_size; size_t offset = 0; - hbool_t found; + bool found; herr_t ret_value = SUCCEED; FUNC_ENTER_NOAPI(FAIL) @@ -552,7 +552,7 @@ H5HL_insert(H5F_t *f, H5HL_t *heap, size_t buf_size, const void *buf, size_t *of /* Look for a free slot large enough for this object and which would * leave zero or at least H5G_SIZEOF_FREE bytes left over. */ - for (fl = heap->freelist, found = FALSE; fl; fl = fl->next) { + for (fl = heap->freelist, found = false; fl; fl = fl->next) { if (fl->size > need_size && fl->size - need_size >= H5HL_SIZEOF_FREE(f)) { /* A big enough free block was found */ offset = fl->offset; @@ -560,14 +560,14 @@ H5HL_insert(H5F_t *f, H5HL_t *heap, size_t buf_size, const void *buf, size_t *of fl->size -= need_size; assert(fl->offset == H5HL_ALIGN(fl->offset)); assert(fl->size == H5HL_ALIGN(fl->size)); - found = TRUE; + found = true; break; } else if (fl->size == need_size) { /* Free block of exact size found */ offset = fl->offset; fl = H5HL__remove_free(heap, fl); - found = TRUE; + found = true; break; } else if (!last_fl || last_fl->offset < fl->offset) { @@ -581,7 +581,7 @@ H5HL_insert(H5F_t *f, H5HL_t *heap, size_t buf_size, const void *buf, size_t *of * can extend that free chunk. Otherwise we'll have to make another * free chunk. If the heap must expand, we double its size. */ - if (found == FALSE) { + if (found == false) { size_t need_more; /* How much more space we need */ size_t new_dblk_size; /* Final size of space allocated for heap data block */ size_t old_dblk_size; /* Previous size of space allocated for heap data block */ @@ -615,7 +615,7 @@ H5HL_insert(H5F_t *f, H5HL_t *heap, size_t buf_size, const void *buf, size_t *of HGOTO_ERROR(H5E_HEAP, H5E_CANTEXTEND, FAIL, "error trying to extend heap"); /* Check if we extended the heap data block in file */ - if (was_extended == TRUE) { + if (was_extended == true) { /* Check for prefix & data block contiguous */ if (heap->single_cache_obj) { /* Resize prefix+data block */ |