diff options
Diffstat (limited to 'src/H5B.c')
-rw-r--r-- | src/H5B.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -229,8 +229,8 @@ H5B_create(H5F_t *f, const H5B_class_t *type, void *udata, bt->nchildren = 0; if (NULL==(bt->page=H5FL_BLK_ALLOC(page,size,1)) || NULL==(bt->native=H5FL_BLK_ALLOC(native_block,total_native_keysize,0)) || - NULL==(bt->child=H5FL_ARR_ALLOC(haddr_t,(hsize_t)(2*H5B_K(f,type)),0)) || - NULL==(bt->key=H5FL_ARR_ALLOC(H5B_key_t,(hsize_t)(2*H5B_K(f,type)+1),0))) { + NULL==(bt->child=H5FL_ARR_ALLOC(haddr_t,(2*H5B_K(f,type)),0)) || + NULL==(bt->key=H5FL_ARR_ALLOC(H5B_key_t,(2*H5B_K(f,type)+1),0))) { HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for B-tree root node"); } @@ -333,8 +333,8 @@ H5B_load(H5F_t *f, haddr_t addr, const void *_type, void *udata) bt->ndirty = 0; if (NULL==(bt->page=H5FL_BLK_ALLOC(page,size,0)) || NULL==(bt->native=H5FL_BLK_ALLOC(native_block,total_nkey_size,0)) || - NULL==(bt->key=H5FL_ARR_ALLOC(H5B_key_t,(hsize_t)(2*H5B_K(f,type)+1),0)) || - NULL==(bt->child=H5FL_ARR_ALLOC(haddr_t,(hsize_t)(2*H5B_K(f,type)),0))) { + NULL==(bt->key=H5FL_ARR_ALLOC(H5B_key_t,(2*H5B_K(f,type)+1),0)) || + NULL==(bt->child=H5FL_ARR_ALLOC(haddr_t,(2*H5B_K(f,type)),0))) { HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); } @@ -1563,7 +1563,7 @@ H5B_iterate (H5F_t *f, const H5B_class_t *type, haddr_t addr, void *udata) * We've reached the left-most leaf. Now follow the right-sibling * pointer from leaf to leaf until we've processed all leaves. */ - if (NULL==(child=H5FL_ARR_ALLOC(haddr_t,(hsize_t)(2*H5B_K(f,type)),0)) || + if (NULL==(child=H5FL_ARR_ALLOC(haddr_t,(2*H5B_K(f,type)),0)) || NULL==(key=H5MM_malloc((2*H5B_K(f, type)+1)*type->sizeof_nkey))) { HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); |