summaryrefslogtreecommitdiffstats
path: root/src/H5F.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2004-06-10 21:02:43 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2004-06-10 21:02:43 (GMT)
commit8b82f6d9f0100e07bd4eb1267404135c7f0515d1 (patch)
tree8c27afbe6e2695c31ee6fedeb2f47add980e4c46 /src/H5F.c
parent9d0ee097081d06dc71fa0d103716a01e24ada2b3 (diff)
downloadhdf5-8b82f6d9f0100e07bd4eb1267404135c7f0515d1.zip
hdf5-8b82f6d9f0100e07bd4eb1267404135c7f0515d1.tar.gz
hdf5-8b82f6d9f0100e07bd4eb1267404135c7f0515d1.tar.bz2
[svn-r8648] Purpose:
Code optimization Description: Eliminate some operations through temporary variables in H5F_addr_encode. Eliminate some redundant memset()'s of structures that will be completely overwritten in the variable-length datatype code. Platforms tested: Solaris 2.7 (arabica) FreeBSD 4.10 (sleipnir) w/parallel
Diffstat (limited to 'src/H5F.c')
-rw-r--r--src/H5F.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/H5F.c b/src/H5F.c
index db27c6a..456a799 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -4629,18 +4629,16 @@ void
H5F_addr_encode(const H5F_t *f, uint8_t **pp/*in,out*/, haddr_t addr)
{
unsigned i;
- haddr_t tmp;
assert(f);
assert(pp && *pp);
if (H5F_addr_defined(addr)) {
- tmp = addr;
for (i=0; i<H5F_SIZEOF_ADDR(f); i++) {
- *(*pp)++ = (uint8_t)(tmp & 0xff);
- tmp >>= 8;
+ *(*pp)++ = (uint8_t)(addr & 0xff);
+ addr >>= 8;
}
- assert("overflow" && 0 == tmp);
+ assert("overflow" && 0 == addr);
} else {
for (i=0; i<H5F_SIZEOF_ADDR(f); i++)