]> err.no Git - varnish/commitdiff
correctly round INT32_MAX down to page boundary
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sat, 16 Sep 2006 15:51:43 +0000 (15:51 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sat, 16 Sep 2006 15:51:43 +0000 (15:51 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1027 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/storage_file.c

index 517561117826f0b54b4e54d963315a77c5d04be2..ac4a8465cc2994d3370ce6a6ff395dd124c03093 100644 (file)
@@ -187,6 +187,7 @@ smf_calcsize(struct smf_sc *sc, const char *size, int newfile)
                    "  Specifiy explicit size to override.\n"
                );
                l = INT32_MAX;
+               l -= (l % bs);
        }
 
        printf("file %s size %ju bytes (%ju fs-blocks, %ju pages)\n",