r2029 - trunk/varnish-cache/bin/varnishd

phk at projects.linpro.no phk at projects.linpro.no
Tue Sep 25 09:57:07 CEST 2007


Author: phk
Date: 2007-09-25 09:57:06 +0200 (Tue, 25 Sep 2007)
New Revision: 2029

Modified:
   trunk/varnish-cache/bin/varnishd/shmlog.c
Log:
Make the logic visible for FlexeLint


Modified: trunk/varnish-cache/bin/varnishd/shmlog.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/shmlog.c	2007-09-25 07:40:01 UTC (rev 2028)
+++ trunk/varnish-cache/bin/varnishd/shmlog.c	2007-09-25 07:57:06 UTC (rev 2029)
@@ -178,9 +178,9 @@
 	unsigned char *p;
 	unsigned l;
 
-	if (w->wlp == w->wlog)
+	l = pdiff(w->wlog, w->wlp);
+	if (l == 0)
 		return;
-	l = pdiff(w->wlog, w->wlp);
 	LOCKSHM(&vsl_mtx);
 	VSL_stats->shm_writes++;
 	VSL_stats->shm_records += w->wlr;




More information about the varnish-commit mailing list