diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2007-05-14 04:05:28 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2007-05-14 04:05:28 (GMT) |
commit | d16a803257ca2b2d4c03db4c7b5649fed690bfcf (patch) | |
tree | d175b5eefe2856a146d902aea089fb9f15e014d4 /src | |
parent | 00a50871bb7e561515f81cebd45c2de03b6cc9d4 (diff) | |
download | hdf5-d16a803257ca2b2d4c03db4c7b5649fed690bfcf.zip hdf5-d16a803257ca2b2d4c03db4c7b5649fed690bfcf.tar.gz hdf5-d16a803257ca2b2d4c03db4c7b5649fed690bfcf.tar.bz2 |
[svn-r13750] Description:
Various minor cleanups found while working on the "unique, but sharable"
ISOHM changes.
Tested on:
Mac OS X/32 10.4.9 (amazon)
FreeBSD/32 6.2 (duty)
Diffstat (limited to 'src')
-rw-r--r-- | src/H5Atest.c | 2 | ||||
-rw-r--r-- | src/H5FD.c | 6 | ||||
-rw-r--r-- | src/H5Gtraverse.c | 10 | ||||
-rw-r--r-- | src/H5HF.c | 9 | ||||
-rw-r--r-- | src/H5HFman.c | 2 | ||||
-rw-r--r-- | src/H5MF.c | 8 | ||||
-rw-r--r-- | src/H5SMtest.c | 2 | ||||
-rw-r--r-- | src/H5Spkg.h | 2 |
8 files changed, 29 insertions, 12 deletions
diff --git a/src/H5Atest.c b/src/H5Atest.c index f8a0f02..df88472 100644 --- a/src/H5Atest.c +++ b/src/H5Atest.c @@ -138,7 +138,7 @@ H5A_get_shared_rc_test(hid_t attr_id, hsize_t *ref_count) /* Sanity check */ HDassert(H5O_msg_is_shared(H5O_ATTR_ID, attr)); - /* Retrieve ref count for shared attribute */ + /* Retrieve ref count for shared or shareable attribute */ if(H5SM_get_refcount(attr->oloc.file, H5AC_ind_dxpl_id, H5O_ATTR_ID, &attr->sh_loc, ref_count) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't retrieve shared message ref count") @@ -1880,6 +1880,9 @@ HDfprintf(stderr, "%s: type = %u, size = %Hu\n", FUNC, (unsigned)type, size); } } else { /* Allocate another metadata block */ +#ifdef H5FD_ALLOC_DEBUG +HDfprintf(stderr, "%s: Allocating 'metadata' block\n", FUNC); +#endif /* H5FD_ALLOC_DEBUG */ if(HADDR_UNDEF==(new_meta = H5FD_real_alloc(file, H5FD_MEM_DEFAULT, dxpl_id, file->def_meta_block_size))) HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, HADDR_UNDEF, "can't allocate metadata block") @@ -1996,6 +1999,9 @@ HDfprintf(stderr, "%s: type = %u, size = %Hu\n", FUNC, (unsigned)type, size); } } else { /* Allocate another "small data" block */ +#ifdef H5FD_ALLOC_DEBUG +HDfprintf(stderr, "%s: Allocating 'small data' block\n", FUNC); +#endif /* H5FD_ALLOC_DEBUG */ if(HADDR_UNDEF==(new_data = H5FD_real_alloc(file, type, dxpl_id, file->def_sdata_block_size))) HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, HADDR_UNDEF, "can't allocate raw data block") diff --git a/src/H5Gtraverse.c b/src/H5Gtraverse.c index 99a9113..72a9d07 100644 --- a/src/H5Gtraverse.c +++ b/src/H5Gtraverse.c @@ -266,7 +266,9 @@ H5G_traverse_ud(const H5G_loc_t *grp_loc/*in,out*/, const H5O_link_t *lnk, /* We have a copy of the location and we're holding the file open. * Close the open ID the user passed back. */ - H5Idec_ref(cb_return); + if(H5I_dec_ref(cb_return) < 0) + HGOTO_ERROR(H5E_ATOM, H5E_CANTRELEASE, FAIL, "unable to close atom from UD callback") + cb_return = (-1); done: /* Close location given to callback. */ @@ -276,11 +278,11 @@ done: if(ret_value < 0 && cb_return > 0) if(H5I_dec_ref(cb_return) < 0) - HDONE_ERROR(H5E_ATOM, H5E_CANTRELEASE, FAIL, "unable to close atom from UD callback") + HDONE_ERROR(H5E_ATOM, H5E_CANTRELEASE, FAIL, "unable to close atom from UD callback") - /* Close the LAPL, if we copied the default one */ + /* Close the LAPL, if we copied one */ if(lapl_id > 0 && H5I_dec_ref(lapl_id) < 0) - HDONE_ERROR(H5E_ATOM, H5E_CANTRELEASE, FAIL, "unable to close copied link access property list") + HDONE_ERROR(H5E_ATOM, H5E_CANTRELEASE, FAIL, "unable to close copied link access property list") FUNC_LEAVE_NOAPI(ret_value) } /* end H5G_traverse_ud() */ @@ -156,6 +156,9 @@ H5HF_create(H5F_t *f, hid_t dxpl_id, const H5HF_create_t *cparam) H5HF_t *ret_value; /* Return value */ FUNC_ENTER_NOAPI(H5HF_create, NULL) +#ifdef QAK +HDfprintf(stderr, "%s: Called\n", FUNC); +#endif /* QAK */ /* * Check arguments. @@ -579,6 +582,9 @@ H5HF_write(H5HF_t *fh, hid_t dxpl_id, void *_id, hbool_t UNUSED *id_changed, herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(H5HF_write, FAIL) +#ifdef QAK +HDfprintf(stderr, "%s: Called\n", FUNC); +#endif /* QAK */ /* * Check arguments. @@ -716,6 +722,9 @@ H5HF_remove(H5HF_t *fh, hid_t dxpl_id, const void *_id) herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(H5HF_remove, FAIL) +#ifdef QAK +HDfprintf(stderr, "%s: Called\n", FUNC); +#endif /* QAK */ /* * Check arguments. diff --git a/src/H5HFman.c b/src/H5HFman.c index bd5c680..cf3f939 100644 --- a/src/H5HFman.c +++ b/src/H5HFman.c @@ -282,7 +282,7 @@ H5HF_man_op_real(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id, /* Skip over the flag byte */ id++; - /* Decode the object offset within the heap & it's length */ + /* Decode the object offset within the heap & its length */ #ifdef QAK HDfprintf(stderr, "%s: hdr->heap_off_size = %u, hdr->heap_len_size = %u\n", FUNC, (unsigned)hdr->heap_off_size, (unsigned)hdr->heap_len_size); #endif /* QAK */ @@ -216,6 +216,7 @@ done: FUNC_LEAVE_NOAPI(ret_value); } + /*------------------------------------------------------------------------- * Function: H5MF_alloc_overflow * @@ -227,10 +228,9 @@ done: * 1 if overflow would result (the allocation should not be allowed) * * Programmer: James Laird - * Nat Furrer + * Nat Furrer * Tuesday, June 1, 2004 * - * Modifications: *------------------------------------------------------------------------- */ hbool_t @@ -267,9 +267,9 @@ H5MF_alloc_overflow(H5F_t *f, hsize_t size) space_needed = space_needed >> 16; if(space_needed != 0) - ret_value=TRUE; + ret_value = TRUE; else - ret_value=FALSE; + ret_value = FALSE; FUNC_LEAVE_NOAPI(ret_value) } diff --git a/src/H5SMtest.c b/src/H5SMtest.c index dc619e3..5de8ce1 100644 --- a/src/H5SMtest.c +++ b/src/H5SMtest.c @@ -97,7 +97,7 @@ H5SM_get_mesg_count_test(H5F_t *f, hid_t dxpl_id, unsigned type_id, if(NULL == (table = (H5SM_master_table_t *)H5AC_protect(f, dxpl_id, H5AC_SOHM_TABLE, f->shared->sohm_addr, NULL, NULL, H5AC_READ))) HGOTO_ERROR(H5E_CACHE, H5E_CANTPROTECT, FAIL, "unable to load SOHM master table") - /* Find the correct index and try to delete from it */ + /* Find the correct index for this message type */ if((index_num = H5SM_get_index(table, type_id)) < 0) HGOTO_ERROR(H5E_SOHM, H5E_NOTFOUND, FAIL, "unable to find correct SOHM index") header = &(table->indexes[index_num]); diff --git a/src/H5Spkg.h b/src/H5Spkg.h index 990c525..907b6fd 100644 --- a/src/H5Spkg.h +++ b/src/H5Spkg.h @@ -160,7 +160,7 @@ typedef struct { /* Main dataspace structure (typedef'd in H5Sprivate.h) */ struct H5S_t { - H5S_extent_t extent; /* Dataspace extent */ + H5S_extent_t extent; /* Dataspace extent (must stay first) */ H5S_select_t select; /* Dataspace selection */ }; |