From: des Date: Mon, 7 Aug 2006 16:20:04 +0000 (+0000) Subject: Spell SIZE_MAX correctly. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7726d966b3fa15b06117bb59f3e532e273fdb33a;p=varnish Spell SIZE_MAX correctly. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@733 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishd/storage_file.c b/varnish-cache/bin/varnishd/storage_file.c index 88f9a7e8..922b96bb 100644 --- a/varnish-cache/bin/varnishd/storage_file.c +++ b/varnish-cache/bin/varnishd/storage_file.c @@ -453,7 +453,7 @@ smf_open_chunk(struct smf_sc *sc, off_t sz, off_t off, off_t *fail, off_t *sum) if (*fail < (uintmax_t)sc->pagesize * MINPAGES) return; - if (sz > 0 && sz < *fail && sz < SIZE_T_MAX) { + if (sz > 0 && sz < *fail && sz < SIZE_MAX) { p = mmap(NULL, sz, PROT_READ|PROT_WRITE, MAP_NOCORE | MAP_NOSYNC | MAP_SHARED, sc->fd, off); if (p != MAP_FAILED) { @@ -467,8 +467,8 @@ smf_open_chunk(struct smf_sc *sc, off_t sz, off_t off, off_t *fail, off_t *sum) *fail = sz; h = sz / 2; - if (h > SIZE_T_MAX) - h = SIZE_T_MAX; + if (h > SIZE_MAX) + h = SIZE_MAX; h -= (h % sc->pagesize); smf_open_chunk(sc, h, off, fail, sum);