summaryrefslogtreecommitdiffstats
path: root/src/H5Tconv.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2004-02-05 16:10:40 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2004-02-05 16:10:40 (GMT)
commitad6408e3849dae8bbb1fb25597ccd2f44af7cb36 (patch)
tree6f7b6642bf85a832fdb6f72279af3065e4f49d76 /src/H5Tconv.c
parent08aa29cd5e6c4900cf6ce31d09ab44470cda0cca (diff)
downloadhdf5-ad6408e3849dae8bbb1fb25597ccd2f44af7cb36.zip
hdf5-ad6408e3849dae8bbb1fb25597ccd2f44af7cb36.tar.gz
hdf5-ad6408e3849dae8bbb1fb25597ccd2f44af7cb36.tar.bz2
[svn-r8154] Purpose:
Code cleanup Description: Minor tweaks, cleanups & optimizations to new bit operation routines. Platforms tested: FreeBSD 4.9 (sleipnir) too minor to require h5committest
Diffstat (limited to 'src/H5Tconv.c')
-rw-r--r--src/H5Tconv.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/H5Tconv.c b/src/H5Tconv.c
index cd7a301..280f82c 100644
--- a/src/H5Tconv.c
+++ b/src/H5Tconv.c
@@ -2935,7 +2935,6 @@ H5T_conv_i_i (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, hsize_t nelmts,
}
} else if (src->u.atomic.prec<dst->u.atomic.prec) {
H5T_bit_copy (d, dst->u.atomic.offset, s, src->u.atomic.offset, src->u.atomic.prec);
- /* Why is it set to TRUE? */
H5T_bit_set (d, dst->u.atomic.offset+src->u.atomic.prec, dst->u.atomic.prec-src->u.atomic.prec, TRUE);
} else {
H5T_bit_copy (d, dst->u.atomic.offset, s, src->u.atomic.offset, dst->u.atomic.prec);
@@ -8468,8 +8467,8 @@ H5T_conv_f_i (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, hsize_t nelmts,
/* Allocate enough space for the buffer holding temporary
* converted value
*/
- buf_size = (int)pow(2, src.u.f.esize) / 8 + 1;
- int_buf = (uint8_t*)HDcalloc(buf_size, 1);
+ buf_size = (int)HDpow((double)2.0, (double)src.u.f.esize) / 8 + 1;
+ int_buf = (uint8_t*)H5MM_calloc(buf_size);
/* The conversion loop */
for (elmtno=0; elmtno<nelmts; elmtno++) {
@@ -8734,7 +8733,7 @@ H5T_conv_f_i (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, hsize_t nelmts,
HDmemset(int_buf, 0, buf_size);
}
- HDfree(int_buf);
+ H5MM_xfree(int_buf);
break;