summaryrefslogtreecommitdiffstats
path: root/src/H5Vprivate.h
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2006-03-07 03:26:31 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2006-03-07 03:26:31 (GMT)
commit5f59c68e7f8c2c6ad350646165616323650ae2ac (patch)
tree1e108173f0a15978731f6c9897f78bff715bb6cc /src/H5Vprivate.h
parent9e8c16d83cca2042885855fcfd535ea21897ff94 (diff)
downloadhdf5-5f59c68e7f8c2c6ad350646165616323650ae2ac.zip
hdf5-5f59c68e7f8c2c6ad350646165616323650ae2ac.tar.gz
hdf5-5f59c68e7f8c2c6ad350646165616323650ae2ac.tar.bz2
[svn-r12017] Purpose:
Bug fix Description: Correct problem with new log2(n) routine on 64-bit machines. Solution: Put some casts in to make certain that the values are computed as 32-bit integers. Platforms tested: Linux 2.4 (mir) - 64-bit
Diffstat (limited to 'src/H5Vprivate.h')
-rw-r--r--src/H5Vprivate.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/H5Vprivate.h b/src/H5Vprivate.h
index 55047cb..2deaeaf 100644
--- a/src/H5Vprivate.h
+++ b/src/H5Vprivate.h
@@ -319,7 +319,7 @@ H5V_vector_inc(int n, hsize_t *v1, const hsize_t *v2)
*-------------------------------------------------------------------------
*/
static H5_inline unsigned
-H5V_log2(unsigned n)
+H5V_log2(uint32_t n)
{
static const unsigned MultiplyDeBruijnBitPosition[32] =
{
@@ -327,7 +327,7 @@ H5V_log2(unsigned n)
31, 27, 13, 23, 21, 19, 16, 7, 26, 12, 18, 6, 11, 5, 10, 9
};
- return(MultiplyDeBruijnBitPosition[(n * 0x077CB531UL) >> 27]);
+ return(MultiplyDeBruijnBitPosition[(n * (uint32_t)0x077CB531UL) >> 27]);
} /* H5V_log2() */
#endif /* H5Vprivate_H */