diff options
author | Sean McBride <sean@rogue-research.com> | 2023-08-02 13:39:15 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-02 13:39:15 (GMT) |
commit | 2b0badb90e4e516d0758efbd8ec96449188c7249 (patch) | |
tree | 074e38039b95ca7121a0117069974eff52a04519 /src/H5FAdblkpage.c | |
parent | 56451503c55ef6e5f67fc3bb710f9e5b649b1af2 (diff) | |
download | hdf5-2b0badb90e4e516d0758efbd8ec96449188c7249.zip hdf5-2b0badb90e4e516d0758efbd8ec96449188c7249.tar.gz hdf5-2b0badb90e4e516d0758efbd8ec96449188c7249.tar.bz2 |
Made HGOTO_ERROR a do-while loop (#3308)
* Made HGOTO_ERROR a do-while loop
Diffstat (limited to 'src/H5FAdblkpage.c')
-rw-r--r-- | src/H5FAdblkpage.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/H5FAdblkpage.c b/src/H5FAdblkpage.c index 4d40882..d51f31a 100644 --- a/src/H5FAdblkpage.c +++ b/src/H5FAdblkpage.c @@ -94,11 +94,11 @@ H5FA__dblk_page_alloc(H5FA_hdr_t *hdr, size_t nelmts) /* Allocate memory for the data block */ if (NULL == (dblk_page = H5FL_CALLOC(H5FA_dblk_page_t))) HGOTO_ERROR(H5E_FARRAY, H5E_CANTALLOC, NULL, - "memory allocation failed for fixed array data block page") + "memory allocation failed for fixed array data block page"); /* Share common array information */ if (H5FA__hdr_incr(hdr) < 0) - HGOTO_ERROR(H5E_FARRAY, H5E_CANTINC, NULL, "can't increment reference count on shared array header") + HGOTO_ERROR(H5E_FARRAY, H5E_CANTINC, NULL, "can't increment reference count on shared array header"); dblk_page->hdr = hdr; /* Set non-zero internal fields */ @@ -107,7 +107,7 @@ H5FA__dblk_page_alloc(H5FA_hdr_t *hdr, size_t nelmts) /* Allocate buffer for elements in data block page */ if (NULL == (dblk_page->elmts = H5FL_BLK_MALLOC(page_elmts, nelmts * hdr->cparam.cls->nat_elmt_size))) HGOTO_ERROR(H5E_FARRAY, H5E_CANTALLOC, NULL, - "memory allocation failed for data block page element buffer") + "memory allocation failed for data block page element buffer"); /* Set the return value */ ret_value = dblk_page; @@ -149,7 +149,7 @@ H5FA__dblk_page_create(H5FA_hdr_t *hdr, haddr_t addr, size_t nelmts) /* Allocate the data block page */ if (NULL == (dblk_page = H5FA__dblk_page_alloc(hdr, nelmts))) HGOTO_ERROR(H5E_FARRAY, H5E_CANTALLOC, FAIL, - "memory allocation failed for fixed array data block page") + "memory allocation failed for fixed array data block page"); /* Set info about data block page on disk */ dblk_page->addr = addr; @@ -161,18 +161,18 @@ H5FA__dblk_page_create(H5FA_hdr_t *hdr, haddr_t addr, size_t nelmts) /* Clear any elements in data block page to fill value */ if ((hdr->cparam.cls->fill)(dblk_page->elmts, nelmts) < 0) HGOTO_ERROR(H5E_FARRAY, H5E_CANTSET, FAIL, - "can't set fixed array data block page elements to class's fill value") + "can't set fixed array data block page elements to class's fill value"); /* Cache the new fixed array data block page */ if (H5AC_insert_entry(hdr->f, H5AC_FARRAY_DBLK_PAGE, dblk_page->addr, dblk_page, H5AC__NO_FLAGS_SET) < 0) - HGOTO_ERROR(H5E_FARRAY, H5E_CANTINSERT, FAIL, "can't add fixed array data block page to cache") + HGOTO_ERROR(H5E_FARRAY, H5E_CANTINSERT, FAIL, "can't add fixed array data block page to cache"); inserted = TRUE; /* Add data block page as child of 'top' proxy */ if (hdr->top_proxy) { if (H5AC_proxy_entry_add_child(hdr->top_proxy, hdr->f, dblk_page) < 0) HGOTO_ERROR(H5E_FARRAY, H5E_CANTSET, FAIL, - "unable to add fixed array entry as child of array proxy") + "unable to add fixed array entry as child of array proxy"); dblk_page->top_proxy = hdr->top_proxy; } /* end if */ @@ -233,14 +233,14 @@ H5FA__dblk_page_protect(H5FA_hdr_t *hdr, haddr_t dblk_page_addr, size_t dblk_pag &udata, flags))) HGOTO_ERROR(H5E_FARRAY, H5E_CANTPROTECT, NULL, "unable to protect fixed array data block page, address = %llu", - (unsigned long long)dblk_page_addr) + (unsigned long long)dblk_page_addr); /* Create top proxy, if it doesn't exist */ if (hdr->top_proxy && NULL == dblk_page->top_proxy) { /* Add data block page as child of 'top' proxy */ if (H5AC_proxy_entry_add_child(hdr->top_proxy, hdr->f, dblk_page) < 0) HGOTO_ERROR(H5E_FARRAY, H5E_CANTSET, NULL, - "unable to add fixed array entry as child of array proxy") + "unable to add fixed array entry as child of array proxy"); dblk_page->top_proxy = hdr->top_proxy; } /* end if */ @@ -290,7 +290,7 @@ H5FA__dblk_page_unprotect(H5FA_dblk_page_t *dblk_page, unsigned cache_flags) if (H5AC_unprotect(dblk_page->hdr->f, H5AC_FARRAY_DBLK_PAGE, dblk_page->addr, dblk_page, cache_flags) < 0) HGOTO_ERROR(H5E_FARRAY, H5E_CANTUNPROTECT, FAIL, "unable to unprotect fixed array data block page, address = %llu", - (unsigned long long)dblk_page->addr) + (unsigned long long)dblk_page->addr); done: FUNC_LEAVE_NOAPI(ret_value) @@ -326,7 +326,7 @@ H5FA__dblk_page_dest(H5FA_dblk_page_t *dblk_page) /* Decrement reference count on shared info */ if (H5FA__hdr_decr(dblk_page->hdr) < 0) HGOTO_ERROR(H5E_FARRAY, H5E_CANTDEC, FAIL, - "can't decrement reference count on shared array header") + "can't decrement reference count on shared array header"); dblk_page->hdr = NULL; } /* end if */ |