r664 - trunk/varnish-cache/bin/varnishd

phk at projects.linpro.no phk at projects.linpro.no
Sat Aug 5 14:23:44 CEST 2006


Author: phk
Date: 2006-08-05 14:23:44 +0200 (Sat, 05 Aug 2006)
New Revision: 664

Modified:
   trunk/varnish-cache/bin/varnishd/cache_expire.c
Log:
Make sanity check of binheap permanent and fix style accordingly.


Modified: trunk/varnish-cache/bin/varnishd/cache_expire.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_expire.c	2006-08-05 12:23:09 UTC (rev 663)
+++ trunk/varnish-cache/bin/varnishd/cache_expire.c	2006-08-05 12:23:44 UTC (rev 664)
@@ -106,6 +106,7 @@
 	struct object *o;
 	time_t t;
 	struct sess *sp;
+	struct object *o2;
 
 	(void)arg;
 
@@ -123,12 +124,12 @@
 			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);
 




More information about the varnish-commit mailing list