[master] ee4a4ee We should be able to rely on POSIX' SSIZE_MAX here.
Poul-Henning Kamp
phk at project.varnish-software.com
Sat Jan 22 10:33:57 CET 2011
commit ee4a4eecd86acaa4d39341c8c1592c68734c6400
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Sat Jan 22 09:33:18 2011 +0000
We should be able to rely on POSIX' SSIZE_MAX here.
diff --git a/bin/varnishd/cache_fetch.c b/bin/varnishd/cache_fetch.c
index a2a5ba0..35fed5f 100644
--- a/bin/varnishd/cache_fetch.c
+++ b/bin/varnishd/cache_fetch.c
@@ -313,13 +313,7 @@ fetch_eof(struct sess *sp, struct http_conn *htc)
assert(sp->wrk->body_status == BS_EOF);
sp->wrk->vfp->begin(sp, 0);
- i = sp->wrk->vfp->bytes(sp, htc,
-#ifdef SSIZE_T_MAX
- SSIZE_T_MAX
-#else
- sizeof(size_t) == 4 ? ((size_t)1<<30) : ((size_t)1 << 62)
-#endif
- );
+ i = sp->wrk->vfp->bytes(sp, htc, SSIZE_MAX);
if (i < 0) {
WSP(sp, SLT_FetchError, "eof read_error: %d (%s)",
errno, strerror(errno));
More information about the varnish-commit
mailing list