diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2004-06-14 19:32:02 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2004-06-14 19:32:02 (GMT) |
commit | ef01629bb29800c8837a261b85897570e4c092c1 (patch) | |
tree | d83127b519689f70929ac4feec2b3716d06addcd /src/H5FDmulti.c | |
parent | f5a192ff0d3d8f4279b356ff54b1a2e78e22c8ec (diff) | |
download | hdf5-ef01629bb29800c8837a261b85897570e4c092c1.zip hdf5-ef01629bb29800c8837a261b85897570e4c092c1.tar.gz hdf5-ef01629bb29800c8837a261b85897570e4c092c1.tar.bz2 |
[svn-r8683] Purpose:
Code optimization
Description:
Use 'size_t' instead of 'hsize_t' to track the number of elements in
memory buffers, especially for type conversion.
Platforms tested:
Solaris 2.7 (arabica)
FreeBSD 4.10 (sleipnir) w/parallel
Too minor to require h5committest
Diffstat (limited to 'src/H5FDmulti.c')
-rw-r--r-- | src/H5FDmulti.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/H5FDmulti.c b/src/H5FDmulti.c index b0c5ea2..f863b55 100644 --- a/src/H5FDmulti.c +++ b/src/H5FDmulti.c @@ -791,7 +791,7 @@ H5FD_multi_sb_encode(H5FD_t *_file, char *name/*out*/, H5FD_multi_t *file = (H5FD_multi_t*)_file; haddr_t memb_eoa; unsigned char *p; - hsize_t nseen; + size_t nseen; size_t i; H5FD_mem_t m; static const char *func="H5FD_multi_sb_encode"; /* Function Name for error reporting */ @@ -875,7 +875,7 @@ H5FD_multi_sb_decode(H5FD_t *_file, const char *name, const unsigned char *buf) char x[2*H5FD_MEM_NTYPES*8]; H5FD_mem_t map[H5FD_MEM_NTYPES]; int i; - hsize_t nseen=0; + size_t nseen=0; hbool_t map_changed=FALSE; hbool_t in_use[H5FD_MEM_NTYPES]; const char *memb_name[H5FD_MEM_NTYPES]; @@ -918,8 +918,7 @@ H5FD_multi_sb_decode(H5FD_t *_file, const char *name, const unsigned char *buf) /* Decode Address and EOA values */ assert(sizeof(haddr_t)<=8); - assert((nseen*2*8)==(hsize_t)((size_t)(nseen*2*8))); /*check for overflow*/ - memcpy(x, buf, (size_t)(nseen*2*8)); + memcpy(x, buf, (nseen*2*8)); buf += nseen*2*8; if (H5Tconvert(H5T_STD_U64LE, H5T_NATIVE_HADDR, nseen*2, x, NULL, H5P_DEFAULT)<0) H5Epush_ret(func, H5E_ERR_CLS, H5E_DATATYPE, H5E_CANTCONVERT, "can't convert superblock info", -1) |