summaryrefslogtreecommitdiffstats
path: root/src/H5Ocont.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2004-06-23 15:36:35 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2004-06-23 15:36:35 (GMT)
commit7c3df64cc4742c0316ca81aeef67bd95a5737c70 (patch)
treef6aa023c661a881b2495ea0be4e745b43eea091f /src/H5Ocont.c
parent19644d75931aaa79951830d85eda28de08f17180 (diff)
downloadhdf5-7c3df64cc4742c0316ca81aeef67bd95a5737c70.zip
hdf5-7c3df64cc4742c0316ca81aeef67bd95a5737c70.tar.gz
hdf5-7c3df64cc4742c0316ca81aeef67bd95a5737c70.tar.bz2
[svn-r8731] Purpose:
Code cleanup & minor optimization Description: Re-work the way interface initialization routines are specified in the library to avoid the overhead of checking for them in routines where there is no interface initialization routine. This cleans up warnings with gcc 3.4, reduces the library binary size a bit (about 2-3%) and should speedup the library's execution slightly. Platforms tested: FreeBSD 4.10 (sleipnir) w/gcc34 h5committest
Diffstat (limited to 'src/H5Ocont.c')
-rw-r--r--src/H5Ocont.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/src/H5Ocont.c b/src/H5Ocont.c
index e8dca5b..12e5ee7 100644
--- a/src/H5Ocont.c
+++ b/src/H5Ocont.c
@@ -61,9 +61,6 @@ const H5O_class_t H5O_CONT[1] = {{
H5O_cont_debug, /*debugging */
}};
-/* Interface initialization */
-static int interface_initialize_g = 0;
-#define INTERFACE_INIT NULL
/*-------------------------------------------------------------------------
* Function: H5O_cont_decode
@@ -88,7 +85,7 @@ H5O_cont_decode(H5F_t *f, hid_t UNUSED dxpl_id, const uint8_t *p, H5O_shared_t U
H5O_cont_t *cont = NULL;
void *ret_value;
- FUNC_ENTER_NOAPI(H5O_cont_decode, NULL);
+ FUNC_ENTER_NOAPI_NOINIT(H5O_cont_decode);
/* check args */
assert(f);
@@ -128,9 +125,8 @@ static herr_t
H5O_cont_encode(H5F_t *f, uint8_t *p, const void *_mesg)
{
const H5O_cont_t *cont = (const H5O_cont_t *) _mesg;
- herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_cont_encode, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_cont_encode);
/* check args */
assert(f);
@@ -141,8 +137,7 @@ H5O_cont_encode(H5F_t *f, uint8_t *p, const void *_mesg)
H5F_addr_encode(f, &p, cont->addr);
H5F_ENCODE_LENGTH(f, p, cont->size);
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
}
@@ -166,9 +161,8 @@ H5O_cont_debug(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const void *_mesg, FILE *
int indent, int fwidth)
{
const H5O_cont_t *cont = (const H5O_cont_t *) _mesg;
- herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_cont_debug, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_cont_debug);
/* check args */
assert(f);
@@ -187,6 +181,5 @@ H5O_cont_debug(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const void *_mesg, FILE *
"Points to chunk number:",
(int) (cont->chunkno));
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
}