diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2016-01-29 13:51:29 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2016-01-29 13:51:29 (GMT) |
commit | 61ab7b8bf3f15e31728ed5d4274a4e826f76ff7a (patch) | |
tree | ec8d1f78ce20288e0151cda3393561ed34215329 /src/H5B2int.c | |
parent | 821ce6874d9e2b322dda171f95901d5f68a1c26a (diff) | |
download | hdf5-61ab7b8bf3f15e31728ed5d4274a4e826f76ff7a.zip hdf5-61ab7b8bf3f15e31728ed5d4274a4e826f76ff7a.tar.gz hdf5-61ab7b8bf3f15e31728ed5d4274a4e826f76ff7a.tar.bz2 |
[svn-r29016] Merge of r28936, 28949, 28960-29009 from trunk.
Tested on: 64-bit Ubuntu 15.10 (Linux 4.2.0 x86_64) gcc 5.2.1
autotools serial w/ Fortran and C++
autotools parallel (MPICH 3.1.4) w/ Fortran
CMake serial (3.3.2, via cmakehdf5)
Diffstat (limited to 'src/H5B2int.c')
-rw-r--r-- | src/H5B2int.c | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/src/H5B2int.c b/src/H5B2int.c index a9c9ecc..aefb189 100644 --- a/src/H5B2int.c +++ b/src/H5B2int.c @@ -2962,17 +2962,15 @@ H5B2__create_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id, void *parent, H5B2_node_ptr_t /* Increment ref. count on B-tree header */ if(H5B2__hdr_incr(hdr) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTINC, FAIL, "can't increment ref. count on B-tree header") + HGOTO_ERROR(H5E_BTREE, H5E_CANTINC, FAIL, "can't increment ref. count on B-tree header") /* Share B-tree header information */ leaf->hdr = hdr; /* Allocate space for the native keys in memory */ if(NULL == (leaf->leaf_native = (uint8_t *)H5FL_FAC_MALLOC(hdr->node_info[0].nat_rec_fac))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for B-tree leaf native keys") -#ifdef H5_CLEAR_MEMORY -HDmemset(leaf->leaf_native, 0, hdr->cls->nrec_size * hdr->node_info[0].max_nrec); -#endif /* H5_CLEAR_MEMORY */ + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for B-tree leaf native keys") + HDmemset(leaf->leaf_native, 0, hdr->cls->nrec_size * hdr->node_info[0].max_nrec); /* Set number of records */ leaf->nrec = 0; @@ -2986,15 +2984,15 @@ HDmemset(leaf->leaf_native, 0, hdr->cls->nrec_size * hdr->node_info[0].max_nrec) /* Allocate space on disk for the leaf */ if(HADDR_UNDEF == (node_ptr->addr = H5MF_alloc(hdr->f, H5FD_MEM_BTREE, dxpl_id, (hsize_t)hdr->node_size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "file allocation failed for B-tree leaf node") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "file allocation failed for B-tree leaf node") /* Cache the new B-tree node */ if(H5AC_insert_entry(hdr->f, dxpl_id, H5AC_BT2_LEAF, node_ptr->addr, leaf, H5AC__NO_FLAGS_SET) < 0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "can't add B-tree leaf to cache") + HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "can't add B-tree leaf to cache") done: if(ret_value < 0) { - if(leaf) + if(leaf) if(H5B2__leaf_free(leaf) < 0) HDONE_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to release v2 B-tree leaf node") } /* end if */ @@ -3092,16 +3090,12 @@ H5B2__create_internal(H5B2_hdr_t *hdr, hid_t dxpl_id, void *parent, /* Allocate space for the native keys in memory */ if(NULL == (internal->int_native = (uint8_t *)H5FL_FAC_MALLOC(hdr->node_info[depth].nat_rec_fac))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for B-tree internal native keys") -#ifdef H5_CLEAR_MEMORY -HDmemset(internal->int_native, 0, hdr->cls->nrec_size * hdr->node_info[depth].max_nrec); -#endif /* H5_CLEAR_MEMORY */ + HDmemset(internal->int_native, 0, hdr->cls->nrec_size * hdr->node_info[depth].max_nrec); /* Allocate space for the node pointers in memory */ if(NULL == (internal->node_ptrs = (H5B2_node_ptr_t *)H5FL_FAC_MALLOC(hdr->node_info[depth].node_ptr_fac))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for B-tree internal node pointers") -#ifdef H5_CLEAR_MEMORY -HDmemset(internal->node_ptrs, 0, sizeof(H5B2_node_ptr_t) * (hdr->node_info[depth].max_nrec + 1)); -#endif /* H5_CLEAR_MEMORY */ + HDmemset(internal->node_ptrs, 0, sizeof(H5B2_node_ptr_t) * (hdr->node_info[depth].max_nrec + 1)); /* Set number of records & depth of the node */ internal->nrec = 0; |