Commit 08d91ed2 authored by Dag Erling Smørgrav's avatar Dag Erling Smørgrav

Spell SIZE_MAX correctly.

git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@733 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent efae6e77
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment