summaryrefslogtreecommitdiffstats
path: root/src/H5Ocache.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2010-05-27 22:57:29 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2010-05-27 22:57:29 (GMT)
commite4246519c9d59a5f837f2b1009471533b729b778 (patch)
tree0ed23bfb58157edccfa11487a6c9f293b9e97670 /src/H5Ocache.c
parentfc3de1ec794584b1bdc6e615d8d2afc15f5bb5ec (diff)
downloadhdf5-e4246519c9d59a5f837f2b1009471533b729b778.zip
hdf5-e4246519c9d59a5f837f2b1009471533b729b778.tar.gz
hdf5-e4246519c9d59a5f837f2b1009471533b729b778.tar.bz2
[svn-r18920] Description:
Bring r18917 from trunk to 1.8 branch: Bring r18911 (plus some adaptions to match the code on the trunk) from the metadata journaling "merging" branch to the trunk: More general changes to align trunk with eventual changes from metadata journaling branch. Tested on: FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x, w/C++ & FORTRAN, in production mode
Diffstat (limited to 'src/H5Ocache.c')
-rw-r--r--src/H5Ocache.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/H5Ocache.c b/src/H5Ocache.c
index 7e7d738..fd8be18 100644
--- a/src/H5Ocache.c
+++ b/src/H5Ocache.c
@@ -616,7 +616,10 @@ H5O_size(const H5F_t UNUSED *f, const H5O_t *oh, size_t *size_ptr)
HDassert(size_ptr);
/* Report the object header's prefix+first chunk length */
- *size_ptr = (size_t)H5O_SIZEOF_HDR(oh) + oh->chunk0_size;
+ if(oh->chunk0_size)
+ *size_ptr = H5O_SIZEOF_HDR(oh) + oh->chunk0_size;
+ else
+ *size_ptr = oh->chunk[0].size;
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5O_size() */