Commit 0a6262e8 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

more asserts


git-svn-id: http://www.varnish-cache.org/svn/trunk@284 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent eed28da5
......@@ -136,6 +136,7 @@ binheap_insert(struct binheap *bh, void *p)
{
unsigned u;
assert(bh != NULL);
assert(bh->magic == BINHEAP_MAGIC);
assert(bh->length >= bh->next);
if (bh->length == bh->next) {
......@@ -158,6 +159,7 @@ void *
binheap_root(struct binheap *bh)
{
assert(bh != NULL);
assert(bh->magic == BINHEAP_MAGIC);
if(bh->next == 0)
return (NULL);
......@@ -168,6 +170,7 @@ void
binheap_delete(struct binheap *bh, unsigned idx)
{
assert(bh != NULL);
assert(bh->magic == BINHEAP_MAGIC);
assert(bh->next > 0);
assert(idx < bh->next);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment