[master] 72d94d7 Add missing checks for Z_OK
Poul-Henning Kamp
phk at varnish-cache.org
Wed Mar 2 15:29:54 CET 2011
commit 72d94d7c87713cbdbf3f4f3ef5818cc146ae7056
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Wed Mar 2 14:29:30 2011 +0000
Add missing checks for Z_OK
Found & Patch by: Dmitry Panov
diff --git a/bin/varnishd/cache_gzip.c b/bin/varnishd/cache_gzip.c
index 7af71c8..9b5180c 100644
--- a/bin/varnishd/cache_gzip.c
+++ b/bin/varnishd/cache_gzip.c
@@ -428,7 +428,7 @@ vfp_gunzip_bytes(struct sess *sp, struct http_conn *htc, ssize_t bytes)
assert(i == Z_OK || i == Z_STREAM_END);
sp->obj->len += dl;
}
- if (i == Z_STREAM_END)
+ if (i == Z_OK || i == Z_STREAM_END)
return (1);
return (-1);
}
@@ -580,7 +580,7 @@ vfp_testgzip_bytes(struct sess *sp, struct http_conn *htc, ssize_t bytes)
assert(i == Z_OK || i == Z_STREAM_END);
}
}
- if (i == Z_STREAM_END)
+ if (i == Z_OK || i == Z_STREAM_END)
return (1);
return (-1);
}
More information about the varnish-commit
mailing list