summaryrefslogtreecommitdiffstats
path: root/src/H5FL.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2003-12-10 18:32:06 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2003-12-10 18:32:06 (GMT)
commitbf918c5abe8df84acb2f1ab7b977e1f2a15ef5fd (patch)
tree6fd63ce7c27b1b0d87be9da2d4ec418f88468807 /src/H5FL.c
parentd19927898d6aed66d3f46ca5e72bba2469372820 (diff)
downloadhdf5-bf918c5abe8df84acb2f1ab7b977e1f2a15ef5fd.zip
hdf5-bf918c5abe8df84acb2f1ab7b977e1f2a15ef5fd.tar.gz
hdf5-bf918c5abe8df84acb2f1ab7b977e1f2a15ef5fd.tar.bz2
[svn-r7925] 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
Diffstat (limited to 'src/H5FL.c')
-rw-r--r--src/H5FL.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/H5FL.c b/src/H5FL.c
index 758015b..1b010dd 100644
--- a/src/H5FL.c
+++ b/src/H5FL.c
@@ -742,6 +742,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)
@@ -817,6 +818,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)))
@@ -929,6 +931,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) {
@@ -1285,6 +1288,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)
@@ -1368,6 +1372,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)))
@@ -1407,6 +1412,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) {