summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2003-12-10 18:31:39 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2003-12-10 18:31:39 (GMT)
commit404567ce6466d3cf04743f2dc1cdf15568b01a5d (patch)
tree4c8aa82738188ee7514335372ae81cadcb224a18
parent1ebb93f0f813e57a3ddc4450aa45494624c722c1 (diff)
downloadhdf5-404567ce6466d3cf04743f2dc1cdf15568b01a5d.zip
hdf5-404567ce6466d3cf04743f2dc1cdf15568b01a5d.tar.gz
hdf5-404567ce6466d3cf04743f2dc1cdf15568b01a5d.tar.bz2
[svn-r7924] Purpose:
Code cleanup Description: Add more assertions to detect attempted allocations of zero-sized blocks. Platforms tested: FreeBSD 4.9 (sleipnir) w & w/o parallel too minor to require h5committest
-rw-r--r--src/H5FL.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/H5FL.c b/src/H5FL.c
index 0224b3e..b8bc04e 100644
--- a/src/H5FL.c
+++ b/src/H5FL.c
@@ -752,6 +752,7 @@ H5FL_blk_malloc(H5FL_blk_head_t *head, size_t size)
/* Double check parameters */
assert(head);
+ assert(size);
/* Make certain the list is initialized first */
if(!head->init)
@@ -828,6 +829,7 @@ H5FL_blk_calloc(H5FL_blk_head_t *head, size_t size)
/* Double check parameters */
assert(head);
+ assert(size);
/* Allocate the block */
if (NULL==(ret_value = H5FL_blk_malloc(head,size)))
@@ -942,6 +944,7 @@ H5FL_blk_realloc(H5FL_blk_head_t *head, void *block, size_t new_size)
/* Double check parameters */
assert(head);
+ assert(new_size);
/* Check if we are actually re-allocating a block */
if(block!=NULL) {
@@ -1303,6 +1306,7 @@ H5FL_arr_malloc(H5FL_arr_head_t *head, size_t elem)
/* Double check parameters */
assert(head);
+ assert(elem);
/* Make certain the list is initialized first */
if(!head->init)
@@ -1387,6 +1391,7 @@ H5FL_arr_calloc(H5FL_arr_head_t *head, size_t elem)
/* Double check parameters */
assert(head);
+ assert(elem);
/* Allocate the array */
if (NULL==(ret_value = H5FL_arr_malloc(head,elem)))
@@ -1426,6 +1431,7 @@ H5FL_arr_realloc(H5FL_arr_head_t *head, void * obj, size_t new_elem)
/* Double check parameters */
assert(head);
+ assert(new_elem);
/* Check if we are really allocating the object */
if(obj==NULL) {