From b9d7051067b0c839e374351ec328d1993bfb7bbb Mon Sep 17 00:00:00 2001 From: phk Date: Mon, 3 Jul 2006 15:01:14 +0000 Subject: [PATCH] more asserts git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@284 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/lib/libvarnish/binary_heap.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/varnish-cache/lib/libvarnish/binary_heap.c b/varnish-cache/lib/libvarnish/binary_heap.c index 44219d46..274d337b 100644 --- a/varnish-cache/lib/libvarnish/binary_heap.c +++ b/varnish-cache/lib/libvarnish/binary_heap.c @@ -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); -- 2.39.5