From 45d515096004c89043f2a3f0e500cb2db01a1796 Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Sat, 18 Aug 2001 20:01:15 -0500 Subject: [svn-r4391] 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) --- src/H5Tconv.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/H5Tconv.c b/src/H5Tconv.c index 3f9890b..f7cfc20 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 -- cgit v0.12