summaryrefslogtreecommitdiffstats
path: root/src/H5H.c
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1998-01-28 16:50:09 (GMT)
committerRobb Matzke <matzke@llnl.gov>1998-01-28 16:50:09 (GMT)
commitc0cfc4421ad7c95c46c2a654f8c06bff8db3588f (patch)
treed874539e4492511c07ebd682172c257a32c49055 /src/H5H.c
parent538069b3e0d262ac058cad2d4370eb30b9e6cee9 (diff)
downloadhdf5-c0cfc4421ad7c95c46c2a654f8c06bff8db3588f.zip
hdf5-c0cfc4421ad7c95c46c2a654f8c06bff8db3588f.tar.gz
hdf5-c0cfc4421ad7c95c46c2a654f8c06bff8db3588f.tar.bz2
[svn-r185] Changes since 19980128
---------------------- ./src/H5D.c ./src/H5Dpublic.c Added H5Dget_space(). ./src/H5Gstab.c ./src/H5H.c Fixed a comparison with size_t against <0. ./src/H5P.c ./src/H5Pprivate.h ./src/H5Ppublic.h Changed `intn' to `int' for public function args and returns. H5Pget_hyperslab() returns the dimensionality. ./test/testhdf5.h Clears error stack more frequently. ./src/H5Psimp.c ./test/cmpd_dset.c Impelementing data space conversion.
Diffstat (limited to 'src/H5H.c')
-rw-r--r--src/H5H.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/H5H.c b/src/H5H.c
index 0449d02..65e26c3 100644
--- a/src/H5H.c
+++ b/src/H5H.c
@@ -529,7 +529,7 @@ H5H_remove_free(H5H_t *heap, H5H_free_t *fl)
*
* Return: Success: Offset of new item within heap.
*
- * Failure: FAIL
+ * Failure: (size_t)(-1)
*
* Programmer: Robb Matzke
* matzke@llnl.gov
@@ -551,18 +551,17 @@ H5H_insert(H5F_t *f, const haddr_t *addr, size_t buf_size, const void *buf)
static nmessages = 0;
#endif
- FUNC_ENTER(H5H_insert, FAIL);
+ FUNC_ENTER(H5H_insert, (size_t)(-1));
/* check arguments */
assert(f);
- if (!addr)
- addr = &(f->shared->smallobj_addr);
+ if (!addr) addr = &(f->shared->smallobj_addr);
assert(H5F_addr_defined(addr));
assert(buf_size > 0);
assert(buf);
if (NULL == (heap = H5AC_find(f, H5AC_HEAP, addr, NULL, NULL))) {
- HRETURN_ERROR(H5E_HEAP, H5E_CANTLOAD, FAIL,
+ HRETURN_ERROR(H5E_HEAP, H5E_CANTLOAD, (size_t)(-1),
"unable to load heap");
}
heap->dirty += 1;
@@ -579,7 +578,8 @@ H5H_insert(H5F_t *f, const haddr_t *addr, size_t buf_size, const void *buf)
* leave zero or at least H5G_SIZEOF_FREE bytes left over.
*/
for (fl = heap->freelist, found = FALSE; fl; fl = fl->next) {
- if (fl->size > need_size && fl->size - need_size >= H5H_SIZEOF_FREE(f)) {
+ if (fl->size > need_size &&
+ fl->size - need_size >= H5H_SIZEOF_FREE(f)) {
/* a bigger free block was found */
offset = fl->offset;
fl->offset += need_size;
@@ -622,8 +622,8 @@ H5H_insert(H5F_t *f, const haddr_t *addr, size_t buf_size, const void *buf)
fprintf(stderr, "H5H_insert: lost %lu bytes at line %d\n",
(unsigned long) (max_fl->size), __LINE__);
if (0 == nmessages++) {
- fprintf(stderr, "Messages from H5H_insert() will go away "
- "when assertions are turned off.\n");
+ fprintf(stderr, "Messages from H5H_insert() will go "
+ "away when assertions are turned off.\n");
}
}
#endif