diff options
Diffstat (limited to 'src/H5HGcache.c')
-rw-r--r-- | src/H5HGcache.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/H5HGcache.c b/src/H5HGcache.c index 0fa6c1b..ecce815 100644 --- a/src/H5HGcache.c +++ b/src/H5HGcache.c @@ -117,14 +117,14 @@ H5HG__hdr_deserialize(H5HG_heap_t *heap, const uint8_t *image, size_t len, const if (H5_IS_BUFFER_OVERFLOW(image, H5_SIZEOF_MAGIC, p_end)) HGOTO_ERROR(H5E_HEAP, H5E_OVERFLOW, FAIL, "ran off end of input buffer while decoding"); if (memcmp(image, H5HG_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0) - HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, FAIL, "bad global heap collection signature") + HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, FAIL, "bad global heap collection signature"); image += H5_SIZEOF_MAGIC; /* Version */ if (H5_IS_BUFFER_OVERFLOW(image, 1, p_end)) HGOTO_ERROR(H5E_HEAP, H5E_OVERFLOW, FAIL, "ran off end of input buffer while decoding"); if (H5HG_VERSION != *image++) - HGOTO_ERROR(H5E_HEAP, H5E_VERSION, FAIL, "wrong version number in global heap") + HGOTO_ERROR(H5E_HEAP, H5E_VERSION, FAIL, "wrong version number in global heap"); /* Reserved */ if (H5_IS_BUFFER_OVERFLOW(image, 3, p_end)) @@ -192,7 +192,7 @@ H5HG__cache_heap_get_final_load_size(const void *image, size_t image_len, void * /* Deserialize the heap's header */ heap.size = 0; if (H5HG__hdr_deserialize(&heap, (const uint8_t *)image, image_len, (const H5F_t *)udata) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTDECODE, FAIL, "can't decode global heap prefix") + HGOTO_ERROR(H5E_HEAP, H5E_CANTDECODE, FAIL, "can't decode global heap prefix"); /* Set the actual global heap size */ *actual_len = heap.size; @@ -233,10 +233,10 @@ H5HG__cache_heap_deserialize(const void *_image, size_t len, void *_udata, hbool /* Allocate a new global heap */ if (NULL == (heap = H5FL_CALLOC(H5HG_heap_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); heap->shared = H5F_SHARED(f); if (NULL == (heap->chunk = H5FL_BLK_MALLOC(gheap_chunk, len))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); /* Copy the image buffer into the newly allocated chunk */ H5MM_memcpy(heap->chunk, _image, len); @@ -252,7 +252,7 @@ H5HG__cache_heap_deserialize(const void *_image, size_t len, void *_udata, hbool if (H5_IS_BUFFER_OVERFLOW(heap->chunk, H5HG_SIZEOF_HDR(f), p_end)) HGOTO_ERROR(H5E_HEAP, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding"); if (H5HG__hdr_deserialize(heap, (const uint8_t *)heap->chunk, len, f) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTDECODE, NULL, "can't decode global heap header") + HGOTO_ERROR(H5E_HEAP, H5E_CANTDECODE, NULL, "can't decode global heap header"); /* Decode each object */ @@ -266,7 +266,7 @@ H5HG__cache_heap_deserialize(const void *_image, size_t len, void *_udata, hbool * about the order of the objects, and unused slots must be set to zero. */ if (NULL == (heap->obj = H5FL_SEQ_CALLOC(H5HG_obj_t, nalloc))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); heap->nalloc = nalloc; while (p < (heap->chunk + heap->size)) { @@ -305,11 +305,11 @@ H5HG__cache_heap_deserialize(const void *_image, size_t len, void *_udata, hbool /* Determine the new number of objects to index */ new_alloc = MAX(heap->nalloc * 2, (idx + 1)); if (idx >= new_alloc) - HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, NULL, "inappropriate heap index") + HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, NULL, "inappropriate heap index"); /* Reallocate array of objects */ if (NULL == (new_obj = H5FL_SEQ_REALLOC(H5HG_obj_t, heap->obj, new_alloc))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); /* Clear newly allocated space */ memset(&new_obj[heap->nalloc], 0, (new_alloc - heap->nalloc) * sizeof(heap->obj[0])); @@ -318,7 +318,7 @@ H5HG__cache_heap_deserialize(const void *_image, size_t len, void *_udata, hbool heap->nalloc = new_alloc; heap->obj = new_obj; if (heap->nalloc <= heap->nused) - HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, NULL, "inappropriate # allocated slots") + HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, NULL, "inappropriate # allocated slots"); } /* Number of references */ @@ -383,7 +383,7 @@ H5HG__cache_heap_deserialize(const void *_image, size_t len, void *_udata, hbool /* Add the new heap to the CWFS list for the file */ if (H5F_cwfs_add(f, heap) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, NULL, "unable to add global heap collection to file's CWFS") + HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, NULL, "unable to add global heap collection to file's CWFS"); ret_value = heap; @@ -473,7 +473,7 @@ H5HG__cache_heap_free_icr(void *_thing) /* Destroy global heap collection */ if (H5HG__free(heap) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy global heap collection") + HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy global heap collection"); done: FUNC_LEAVE_NOAPI(ret_value) |