r4072 - trunk/varnish-cache/bin/varnishd

phk at projects.linpro.no phk at projects.linpro.no
Mon May 11 11:59:19 CEST 2009


Author: phk
Date: 2009-05-11 11:59:19 +0200 (Mon, 11 May 2009)
New Revision: 4072

Modified:
   trunk/varnish-cache/bin/varnishd/cache_httpconn.c
Log:
Nits.



Modified: trunk/varnish-cache/bin/varnishd/cache_httpconn.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_httpconn.c	2009-05-11 09:48:55 UTC (rev 4071)
+++ trunk/varnish-cache/bin/varnishd/cache_httpconn.c	2009-05-11 09:59:19 UTC (rev 4072)
@@ -89,6 +89,7 @@
 	htc->magic = HTTP_CONN_MAGIC;
 	htc->ws = ws;
 	htc->fd = fd;
+	/* XXX: ->s or ->f ? or param ? */
 	(void)WS_Reserve(htc->ws, (htc->ws->e - htc->ws->s) / 2);
 	htc->rxbuf.b = ws->f;
 	htc->rxbuf.e = ws->f;
@@ -133,9 +134,8 @@
 
 	CHECK_OBJ_NOTNULL(htc, HTTP_CONN_MAGIC);
 	i = htc_header_complete(&htc->rxbuf);
-	if (i < 0)
-		htc->rxbuf.e = htc->rxbuf.b;
-	if (i <= 0)
+	assert(i >= 0);
+	if (i == 0)
 		return (0);
 	WS_ReleaseP(htc->ws, htc->rxbuf.e);
 	if (htc->rxbuf.b + i < htc->rxbuf.e) {



More information about the varnish-commit mailing list