summaryrefslogtreecommitdiffstats
path: root/src/H5SM.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2006-12-06 22:19:52 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2006-12-06 22:19:52 (GMT)
commit7b368f006eea17a8b08cac9e6e79e58977edf864 (patch)
tree99e0f328dab0a6c3e602684d94aad309f339498d /src/H5SM.c
parent1fa6d7cbf7062f12bdd85f896d40004f562cc439 (diff)
downloadhdf5-7b368f006eea17a8b08cac9e6e79e58977edf864.zip
hdf5-7b368f006eea17a8b08cac9e6e79e58977edf864.tar.gz
hdf5-7b368f006eea17a8b08cac9e6e79e58977edf864.tar.bz2
[svn-r13028] Description:
Add first pass of "dense" attribute storage to objects. Lots of parts of this are stubbed out, but all the tests are passing and I'll work on the corner cases soon. Eliminated several unused parameters from object header message callback routines. Other, miscellaneous code cleanups, etc. (and probably some things I've forgotten about... :-) Tested on: FreeBSD/32 4.11 (sleipnir) Linux/32 2.4 (heping) AIX/32 5.? (copper)
Diffstat (limited to 'src/H5SM.c')
-rwxr-xr-xsrc/H5SM.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/H5SM.c b/src/H5SM.c
index 409c94b..c3c8d85 100755
--- a/src/H5SM.c
+++ b/src/H5SM.c
@@ -237,10 +237,9 @@ H5SM_get_index(const H5SM_master_table_t *table, unsigned type_id)
{
ssize_t x;
unsigned type_flag;
- hbool_t found = FALSE;
ssize_t ret_value = FAIL;
- FUNC_ENTER_NOAPI(H5SM_get_index, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT(H5SM_get_index)
/* Translate the H5O type_id into an H5SM type flag */
switch(type_id)
@@ -267,12 +266,12 @@ H5SM_get_index(const H5SM_master_table_t *table, unsigned type_id)
/* Search the indexes until we find one that matches this flag or we've
* searched them all.
*/
- for(x=0; x<table->num_indexes && !found; ++x)
+ for(x = 0; x < table->num_indexes; ++x)
{
if(table->indexes[x].mesg_types & type_flag)
{
- found = TRUE;
ret_value = x;
+ break;
}
}
@@ -551,11 +550,11 @@ H5SM_try_share(H5F_t *f, hid_t dxpl_id, unsigned type_id, void *mesg)
/* Find the right index for this message type. If there is no such index
* then this type of message isn't shareable
*/
- H5E_BEGIN_TRY {
- index_num = H5SM_get_index(table, type_id);
- } H5E_END_TRY
- if(index_num < 0)
+ if((index_num = H5SM_get_index(table, type_id)) < 0)
+ {
+ H5E_clear_stack(NULL); /*ignore error*/
HGOTO_DONE(FALSE);
+ } /* end if */
/* If the message isn't big enough, don't bother sharing it */
if(0 == (mesg_size = H5O_msg_mesg_size(f, type_id, mesg, 0)))
@@ -579,7 +578,7 @@ H5SM_try_share(H5F_t *f, hid_t dxpl_id, unsigned type_id, void *mesg)
done:
/* Release the master SOHM table */
- if (table && H5AC_unprotect(f, dxpl_id, H5AC_SOHM_TABLE, f->shared->sohm_addr, table, cache_flags) < 0)
+ if(table && H5AC_unprotect(f, dxpl_id, H5AC_SOHM_TABLE, f->shared->sohm_addr, table, cache_flags) < 0)
HDONE_ERROR(H5E_CACHE, H5E_CANTRELEASE, FAIL, "unable to close SOHM master table")
FUNC_LEAVE_NOAPI(ret_value)