From: phk Date: Sat, 5 Aug 2006 12:23:44 +0000 (+0000) Subject: Make sanity check of binheap permanent and fix style accordingly. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cf04b54d1257761e9f79ce6a1cf5969dba46c534;p=varnish Make sanity check of binheap permanent and fix style accordingly. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@664 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishd/cache_expire.c b/varnish-cache/bin/varnishd/cache_expire.c index 3a42da9f..0be95803 100644 --- a/varnish-cache/bin/varnishd/cache_expire.c +++ b/varnish-cache/bin/varnishd/cache_expire.c @@ -106,6 +106,7 @@ exp_prefetch(void *arg) struct object *o; time_t t; struct sess *sp; + struct object *o2; (void)arg; @@ -123,12 +124,12 @@ exp_prefetch(void *arg) continue; } binheap_delete(exp_heap, o->heap_idx); -{ - struct object *o2; - o2 = binheap_root(exp_heap); - if (o2 != NULL) - assert(o2->ttl >= o->ttl); -} + + /* Sanity check */ + o2 = binheap_root(exp_heap); + if (o2 != NULL) + assert(o2->ttl >= o->ttl); + AZ(pthread_mutex_unlock(&exp_mtx)); VSL(SLT_ExpPick, 0, "%u", o->xid);