]> granicus.if.org Git - apache/commitdiff
* Optimize assignments by using apr_pcalloc instead of apr_palloc.
authorRuediger Pluem <rpluem@apache.org>
Mon, 7 Jan 2008 09:29:00 +0000 (09:29 +0000)
committerRuediger Pluem <rpluem@apache.org>
Mon, 7 Jan 2008 09:29:00 +0000 (09:29 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@609541 13f79535-47bb-0310-9956-ffa450edef68

modules/http/http_filters.c

index 15448ed2b0609de5cefaee61cf52d50ea3132716..d1780264c112a714a472c3c46d1cd3b40ad1faf3 100644 (file)
@@ -191,13 +191,9 @@ apr_status_t ap_http_filter(ap_filter_t *f, apr_bucket_brigade *b,
 
     if (!ctx) {
         const char *tenc, *lenp;
-        f->ctx = ctx = apr_palloc(f->r->pool, sizeof(*ctx));
+        f->ctx = ctx = apr_pcalloc(f->r->pool, sizeof(*ctx));
         ctx->state = BODY_NONE;
-        ctx->remaining = 0;
-        ctx->limit_used = 0;
-        ctx->eos_sent = 0;
         ctx->pos = ctx->chunk_ln;
-        ctx->linesize = 0;
 
         /* LimitRequestBody does not apply to proxied responses.
          * Consider implementing this check in its own filter.