summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2001-08-19 01:00:22 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2001-08-19 01:00:22 (GMT)
commit94ce84440f71233ec37d404c2f03c7bffb997c6e (patch)
treed5980a1a25927be5a2a77873321da6cfe451b2af
parentc5bebe9ddffc45c8b7960b6732648e935ec918a0 (diff)
downloadhdf5-94ce84440f71233ec37d404c2f03c7bffb997c6e.zip
hdf5-94ce84440f71233ec37d404c2f03c7bffb997c6e.tar.gz
hdf5-94ce84440f71233ec37d404c2f03c7bffb997c6e.tar.bz2
[svn-r4390] Purpose:
Bug fix. Description: Byte swapping algorithm wasn't converting the last 8 elements correctly. Solution: Used correct variable... :-) Platforms tested: FreeBSD 4.4 (hawkwind)
-rw-r--r--src/H5Tconv.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/H5Tconv.c b/src/H5Tconv.c
index 2b205fd..1e0b82c 100644
--- a/src/H5Tconv.c
+++ b/src/H5Tconv.c
@@ -475,7 +475,9 @@ H5T_conv_order(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, hsize_t nelmts,
uint8_t tmp;
H5T_t *src = NULL;
H5T_t *dst = NULL;
+#ifdef NO_DUFFS_DEVICE
hsize_t i;
+#endif /* NO_DUFFS_DEVICE */
size_t j, md;
FUNC_ENTER(H5T_conv_order, FAIL);
@@ -552,7 +554,7 @@ H5T_conv_order(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, hsize_t nelmts,
{
size_t duff_count = (nelmts + 7) / 8;
- switch (duff_count % 8)
+ switch (nelmts % 8)
{
case 0:
do
@@ -628,7 +630,7 @@ H5T_conv_order(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, hsize_t nelmts,
{
size_t duff_count = (nelmts + 7) / 8;
- switch (duff_count % 8)
+ switch (nelmts % 8)
{
case 0:
do
@@ -770,7 +772,7 @@ H5T_conv_order(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, hsize_t nelmts,
{
size_t duff_count = (nelmts + 7) / 8;
- switch (duff_count % 8)
+ switch (nelmts % 8)
{
case 0:
do
@@ -978,7 +980,7 @@ H5T_conv_order(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, hsize_t nelmts,
{
size_t duff_count = (nelmts + 7) / 8;
- switch (duff_count % 8)
+ switch (nelmts % 8)
{
case 0:
do