]> err.no Git - varnish/commitdiff
Flexelint does not react to the assert, so tell it what we know.
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Fri, 15 Feb 2008 13:04:36 +0000 (13:04 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Fri, 15 Feb 2008 13:04:36 +0000 (13:04 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2484 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/cache_dir_random.c

index 76c7d43a5ac5464e9d0fcad00e2cdde3df1da23f..1f380563ae08d4d64e52f8f45d461eeba17f9bf6 100644 (file)
@@ -131,7 +131,7 @@ VRT_init_dir_random(struct cli *cli, struct director **bp, const struct vrt_dir_
        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 */