summaryrefslogtreecommitdiffstats
path: root/src/H5Distore.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2002-08-09 20:48:23 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2002-08-09 20:48:23 (GMT)
commit8f7425d2a2fb9ffb7b7b01822a7f9909ce3a4a14 (patch)
tree3978c685e4ac642e74ab97192ecace599f0b622a /src/H5Distore.c
parentd48558126d9c19fe3b418a22086a015bd56997f9 (diff)
downloadhdf5-8f7425d2a2fb9ffb7b7b01822a7f9909ce3a4a14.zip
hdf5-8f7425d2a2fb9ffb7b7b01822a7f9909ce3a4a14.tar.gz
hdf5-8f7425d2a2fb9ffb7b7b01822a7f9909ce3a4a14.tar.bz2
[svn-r5867] Purpose:
Code cleanup Description: Changed the last HRETURN* statements in the FUNC_ENTER macros into HGOTO* macros, which reduces the size of the library binary in certain configurations by another 10% Platforms tested: FreeBSD 4.6 (sleipnir) serial & parallel, IRIX64 6.5 (modi4) serial & parallel
Diffstat (limited to 'src/H5Distore.c')
-rw-r--r--src/H5Distore.c46
1 files changed, 28 insertions, 18 deletions
diff --git a/src/H5Distore.c b/src/H5Distore.c
index 7780b2d..ffcabf3 100644
--- a/src/H5Distore.c
+++ b/src/H5Distore.c
@@ -258,6 +258,7 @@ H5F_istore_decode_key(H5F_t UNUSED *f, H5B_t *bt, uint8_t *raw, void *_key)
H5F_istore_key_t *key = (H5F_istore_key_t *) _key;
int i;
int ndims = H5F_ISTORE_NDIMS(bt);
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5F_istore_decode_key, FAIL);
@@ -271,11 +272,11 @@ H5F_istore_decode_key(H5F_t UNUSED *f, H5B_t *bt, uint8_t *raw, void *_key)
/* decode */
UINT32DECODE(raw, key->nbytes);
UINT32DECODE(raw, key->filter_mask);
- for (i=0; i<ndims; i++) {
+ for (i=0; i<ndims; i++)
UINT64DECODE(raw, key->offset[i]);
- }
- FUNC_LEAVE(SUCCEED);
+done:
+ FUNC_LEAVE(ret_value);
}
@@ -299,6 +300,7 @@ H5F_istore_encode_key(H5F_t UNUSED *f, H5B_t *bt, uint8_t *raw, void *_key)
H5F_istore_key_t *key = (H5F_istore_key_t *) _key;
int ndims = H5F_ISTORE_NDIMS(bt);
int i;
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5F_istore_encode_key, FAIL);
@@ -312,11 +314,11 @@ H5F_istore_encode_key(H5F_t UNUSED *f, H5B_t *bt, uint8_t *raw, void *_key)
/* encode */
UINT32ENCODE(raw, key->nbytes);
UINT32ENCODE(raw, key->filter_mask);
- for (i=0; i<ndims; i++) {
+ for (i=0; i<ndims; i++)
UINT64ENCODE(raw, key->offset[i]);
- }
- FUNC_LEAVE(SUCCEED);
+done:
+ FUNC_LEAVE(ret_value);
}
@@ -341,6 +343,7 @@ H5F_istore_debug_key (FILE *stream, int indent, int fwidth,
const H5F_istore_key_t *key = (const H5F_istore_key_t *)_key;
const H5F_istore_ud1_t *udata = (const H5F_istore_ud1_t *)_udata;
unsigned u;
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5F_istore_debug_key, FAIL);
@@ -352,12 +355,12 @@ H5F_istore_debug_key (FILE *stream, int indent, int fwidth,
"Filter mask:", key->filter_mask);
HDfprintf(stream, "%*s%-*s {", indent, "", fwidth,
"Logical offset:");
- for (u=0; u<udata->mesg.ndims; u++) {
+ for (u=0; u<udata->mesg.ndims; u++)
HDfprintf (stream, "%s%Hd", u?", ":"", key->offset[u]);
- }
HDfputs ("}\n", stream);
- FUNC_LEAVE (SUCCEED);
+done:
+ FUNC_LEAVE (ret_value);
}
@@ -389,7 +392,7 @@ H5F_istore_cmp2(H5F_t UNUSED *f, void *_lt_key, void *_udata,
H5F_istore_key_t *lt_key = (H5F_istore_key_t *) _lt_key;
H5F_istore_key_t *rt_key = (H5F_istore_key_t *) _rt_key;
H5F_istore_ud1_t *udata = (H5F_istore_ud1_t *) _udata;
- int cmp;
+ int ret_value;
FUNC_ENTER_NOAPI(H5F_istore_cmp2, FAIL);
@@ -399,9 +402,10 @@ H5F_istore_cmp2(H5F_t UNUSED *f, void *_lt_key, void *_udata,
assert(udata->mesg.ndims > 0 && udata->mesg.ndims <= H5O_LAYOUT_NDIMS);
/* Compare the offsets but ignore the other fields */
- cmp = H5V_vector_cmp_s(udata->mesg.ndims, lt_key->offset, rt_key->offset);
+ ret_value = H5V_vector_cmp_s(udata->mesg.ndims, lt_key->offset, rt_key->offset);
- FUNC_LEAVE(cmp);
+done:
+ FUNC_LEAVE(ret_value);
}
@@ -441,7 +445,7 @@ H5F_istore_cmp3(H5F_t UNUSED *f, void *_lt_key, void *_udata,
H5F_istore_key_t *lt_key = (H5F_istore_key_t *) _lt_key;
H5F_istore_key_t *rt_key = (H5F_istore_key_t *) _rt_key;
H5F_istore_ud1_t *udata = (H5F_istore_ud1_t *) _udata;
- int cmp = 0;
+ int ret_value = 0;
FUNC_ENTER_NOAPI(H5F_istore_cmp3, FAIL);
@@ -452,12 +456,14 @@ H5F_istore_cmp3(H5F_t UNUSED *f, void *_lt_key, void *_udata,
if (H5V_vector_lt_s(udata->mesg.ndims, udata->key.offset,
lt_key->offset)) {
- cmp = -1;
+ ret_value = -1;
} else if (H5V_vector_ge_s(udata->mesg.ndims, udata->key.offset,
rt_key->offset)) {
- cmp = 1;
+ ret_value = 1;
}
- FUNC_LEAVE(cmp);
+
+done:
+ FUNC_LEAVE(ret_value);
}
@@ -2210,6 +2216,7 @@ H5F_istore_debug(H5F_t *f, haddr_t addr, FILE * stream, int indent,
int fwidth, int ndims)
{
H5F_istore_ud1_t udata;
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5F_istore_debug, FAIL);
@@ -2218,7 +2225,8 @@ H5F_istore_debug(H5F_t *f, haddr_t addr, FILE * stream, int indent,
H5B_debug (f, addr, stream, indent, fwidth, H5B_ISTORE, &udata);
- FUNC_LEAVE (SUCCEED);
+done:
+ FUNC_LEAVE (ret_value);
}
@@ -2749,6 +2757,7 @@ H5F_istore_remove(H5F_t *f, haddr_t addr, void *_lt_key /*in,out */ ,
hbool_t *rt_key_changed /*out */ )
{
H5F_istore_key_t *lt_key = (H5F_istore_key_t *)_lt_key;
+ H5B_ins_t ret_value=H5B_INS_REMOVE; /* Return value */
FUNC_ENTER_NOAPI(H5F_istore_remove,H5B_INS_ERROR);
@@ -2756,7 +2765,8 @@ H5F_istore_remove(H5F_t *f, haddr_t addr, void *_lt_key /*in,out */ ,
*lt_key_changed = FALSE;
*rt_key_changed = FALSE;
- FUNC_LEAVE(H5B_INS_REMOVE);
+done:
+ FUNC_LEAVE(ret_value);
}