summaryrefslogtreecommitdiffstats
path: root/src/H5Tbit.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/H5Tbit.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/H5Tbit.c')
-rw-r--r--src/H5Tbit.c29
1 files changed, 17 insertions, 12 deletions
diff --git a/src/H5Tbit.c b/src/H5Tbit.c
index abc39b0..6f235e7 100644
--- a/src/H5Tbit.c
+++ b/src/H5Tbit.c
@@ -170,6 +170,7 @@ H5T_bit_get_d (uint8_t *buf, size_t offset, size_t size)
{
hsize_t val=0;
size_t i, hs;
+ hsize_t ret_value; /* Return value */
FUNC_ENTER_NOAPI(H5T_bit_get_d, 0);
@@ -177,22 +178,26 @@ H5T_bit_get_d (uint8_t *buf, size_t offset, size_t size)
H5T_bit_copy ((uint8_t*)&val, 0, buf, offset, size);
switch (((H5T_t*)(H5I_object(H5T_NATIVE_INT_g)))->u.atomic.order) {
- case H5T_ORDER_LE:
- break;
+ case H5T_ORDER_LE:
+ break;
- case H5T_ORDER_BE:
- for (i=0, hs=sizeof(val)/2; i<hs; i++) {
- uint8_t tmp = ((uint8_t*)&val)[i];
- ((uint8_t*)&val)[i] = ((uint8_t*)&val)[sizeof(val)-(i+1)];
- ((uint8_t*)&val)[sizeof(val)-(i+1)] = tmp;
- }
- break;
+ case H5T_ORDER_BE:
+ for (i=0, hs=sizeof(val)/2; i<hs; i++) {
+ uint8_t tmp = ((uint8_t*)&val)[i];
+ ((uint8_t*)&val)[i] = ((uint8_t*)&val)[sizeof(val)-(i+1)];
+ ((uint8_t*)&val)[sizeof(val)-(i+1)] = tmp;
+ }
+ break;
- default:
- HDabort ();
+ default:
+ HDabort ();
}
- FUNC_LEAVE (val);
+ /* Set return value */
+ ret_value=val;
+
+done:
+ FUNC_LEAVE (ret_value);
}