r2484 - trunk/varnish-cache/bin/varnishd

phk at projects.linpro.no phk at projects.linpro.no
Fri Feb 15 14:04:36 CET 2008


Author: phk
Date: 2008-02-15 14:04:36 +0100 (Fri, 15 Feb 2008)
New Revision: 2484

Modified:
   trunk/varnish-cache/bin/varnishd/cache_dir_random.c
Log:
Flexelint does not react to the assert, so tell it what we know.


Modified: trunk/varnish-cache/bin/varnishd/cache_dir_random.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_dir_random.c	2008-02-15 12:59:59 UTC (rev 2483)
+++ trunk/varnish-cache/bin/varnishd/cache_dir_random.c	2008-02-15 13:04:36 UTC (rev 2484)
@@ -131,7 +131,7 @@
 	assert(s > 0.0);
 	for (te = t->members; te->host != NULL; te++, i++) {
 		/* First normalize the specified weight in FP */
-		b = te->weight / s;
+		b = te->weight / s;	/*lint !e795 not zero division */
 		/* Then accumulate to eliminate rounding errors */
 		a += b;
 		/* Convert to unsigned in random() range */




More information about the varnish-commit mailing list