summaryrefslogtreecommitdiffstats
path: root/src/H5Ofill.c
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1998-10-02 13:31:24 (GMT)
committerRobb Matzke <matzke@llnl.gov>1998-10-02 13:31:24 (GMT)
commit58ee080e72f4aa1e10bc7c3fcf5f6499aaad18e7 (patch)
tree7f0022dabb2c9a053b2d3c09a56fbd2c52544643 /src/H5Ofill.c
parent849d36019d929c409c50cce08842354139dca2f8 (diff)
downloadhdf5-58ee080e72f4aa1e10bc7c3fcf5f6499aaad18e7.zip
hdf5-58ee080e72f4aa1e10bc7c3fcf5f6499aaad18e7.tar.gz
hdf5-58ee080e72f4aa1e10bc7c3fcf5f6499aaad18e7.tar.bz2
[svn-r734] Changes since 19981001
---------------------- ./src/H5D.c ./src/H5Fistore.c ./src/H5Fprivate.h Fixed a couple things for parallel hdf5 that I broke with the last checkin. ./src/H5Ofill.c If no fill value is specified it isn't added to the object header. ./tools/h5ls.c Added a line-feed after `Unknown object' is printed. ./tools/h5tools.c Fixed printing of scalar values. Need to still track down a failed assertion when H5Sselect_hyperslab() is called with a zero size....
Diffstat (limited to 'src/H5Ofill.c')
-rw-r--r--src/H5Ofill.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/H5Ofill.c b/src/H5Ofill.c
index 1328307..29e5914 100644
--- a/src/H5Ofill.c
+++ b/src/H5Ofill.c
@@ -75,11 +75,14 @@ H5O_fill_decode(H5F_t *f, const uint8 *p, H5O_shared_t *sh)
"memory allocation failed for fill value message");
}
UINT32DECODE(p, mesg->size);
- if (NULL==(mesg->buf=H5MM_malloc(mesg->size))) {
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL,
- "memory allocation failed for fill value");
+ if (mesg->size>0) {
+ if (NULL==(mesg->buf=H5MM_malloc(mesg->size))) {
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL,
+ "memory allocation failed for fill value");
+ }
+ HDmemcpy(mesg->buf, p, mesg->size);
}
- HDmemcpy(mesg->buf, p, mesg->size);
+
ret_value = (void*)mesg;
done: