diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2004-04-19 20:23:04 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2004-04-19 20:23:04 (GMT) |
commit | 92413789bfeeb777f4c40beb8e895a453b1dceec (patch) | |
tree | e16c73c0339f880e2a9f4f6deaad175bd0a252a3 | |
parent | 60206e959e995d9cd1baa60afcb549d3c686017a (diff) | |
download | hdf5-92413789bfeeb777f4c40beb8e895a453b1dceec.zip hdf5-92413789bfeeb777f4c40beb8e895a453b1dceec.tar.gz hdf5-92413789bfeeb777f4c40beb8e895a453b1dceec.tar.bz2 |
[svn-r8393] Purpose:
Code optimization
Description:
Avoid clearing the error stack unless necessary.
Platforms tested:
Solaris 2.7 (arabica)
FreeBSD 4.9 (sleipnir)
too minor to require h5committest
-rw-r--r-- | src/H5Distore.c | 4 | ||||
-rw-r--r-- | src/H5Fistore.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/H5Distore.c b/src/H5Distore.c index 772b763..54c6041 100644 --- a/src/H5Distore.c +++ b/src/H5Distore.c @@ -1421,7 +1421,6 @@ H5F_istore_lock(H5F_t *f, const H5D_dxpl_cache_t *dxpl_cache, hid_t dxpl_id, con udata.mesg = *layout; udata.addr = HADDR_UNDEF; status = H5B_find (f, dxpl_id, H5B_ISTORE, layout->addr, &udata); - H5E_clear(NULL); if (status>=0 && H5F_addr_defined(udata.addr)) { size_t chunk_alloc=0; /*allocated chunk size */ @@ -1444,6 +1443,9 @@ H5F_istore_lock(H5F_t *f, const H5D_dxpl_cache_t *dxpl_cache, hid_t dxpl_id, con } else { H5D_fill_value_t fill_status; + /* Clear the error stack from not finding the chunk on disk */ + H5E_clear(NULL); + /* Chunk size on disk isn't [likely] the same size as the final chunk * size in memory, so allocate memory big enough. */ if (NULL==(chunk = H5MM_malloc (chunk_size))) diff --git a/src/H5Fistore.c b/src/H5Fistore.c index 772b763..54c6041 100644 --- a/src/H5Fistore.c +++ b/src/H5Fistore.c @@ -1421,7 +1421,6 @@ H5F_istore_lock(H5F_t *f, const H5D_dxpl_cache_t *dxpl_cache, hid_t dxpl_id, con udata.mesg = *layout; udata.addr = HADDR_UNDEF; status = H5B_find (f, dxpl_id, H5B_ISTORE, layout->addr, &udata); - H5E_clear(NULL); if (status>=0 && H5F_addr_defined(udata.addr)) { size_t chunk_alloc=0; /*allocated chunk size */ @@ -1444,6 +1443,9 @@ H5F_istore_lock(H5F_t *f, const H5D_dxpl_cache_t *dxpl_cache, hid_t dxpl_id, con } else { H5D_fill_value_t fill_status; + /* Clear the error stack from not finding the chunk on disk */ + H5E_clear(NULL); + /* Chunk size on disk isn't [likely] the same size as the final chunk * size in memory, so allocate memory big enough. */ if (NULL==(chunk = H5MM_malloc (chunk_size))) |