httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Bannert <aa...@clove.org>
Subject [PATCH] convert an apr_pcalloc() to an apr_palloc()
Date Mon, 08 Oct 2001 16:22:24 GMT

In the least this should save us a function call or two per request...

-aaron



Index: server/protocol.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/server/protocol.c,v
retrieving revision 1.47
diff -u -r1.47 protocol.c
--- server/protocol.c	2001/09/29 08:48:59	1.47
+++ server/protocol.c	2001/10/04 20:13:55
@@ -852,8 +852,10 @@
 
     ctx = f->ctx;
     if (!ctx) { /* first time through */
-        f->ctx = ctx = apr_pcalloc(r->pool, sizeof(struct content_length_ctx));
+        f->ctx = ctx = apr_palloc(r->pool, sizeof(struct content_length_ctx));
+        ctx->saved = NULL;
         ctx->compute_len = 1;   /* Assume we will compute the length */
+        ctx->curr_len = 0;
     }
 
     /* Humm, is this check the best it can be? 

Mime
View raw message