summaryrefslogtreecommitdiff
path: root/support/logresolve.c
diff options
context:
space:
mode:
authorTakashi Sato <takashi@apache.org>2009-05-25 14:48:38 +0000
committerTakashi Sato <takashi@apache.org>2009-05-25 14:48:38 +0000
commite3b286f32f25f5afd3eea5f98b118f7f4a27ba5e (patch)
tree4b6bb5688ea8437957361bd5212d48ad989a25ef /support/logresolve.c
parent61a375c88afa29621fe170f2000fa3e18e033186 (diff)
downloadhttpd-e3b286f32f25f5afd3eea5f98b118f7f4a27ba5e.tar.gz
Kill the hardcoded values
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@778433 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'support/logresolve.c')
-rw-r--r--support/logresolve.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/support/logresolve.c b/support/logresolve.c
index 770edd3322..388185d259 100644
--- a/support/logresolve.c
+++ b/support/logresolve.c
@@ -68,6 +68,8 @@
#include <stdlib.h>
#endif
+#define READ_BUF_SIZE 10240
+#define WRITE_BUF_SIZE 10240
#define LINE_BUF_SIZE 2048
static apr_file_t *errfile;
@@ -189,14 +191,14 @@ int main(int argc, const char * const argv[])
#if APR_MAJOR_VERSION > 1 || (APR_MAJOR_VERSION == 1 && APR_MINOR_VERSION >= 3)
/* Allocate two new 10k file buffers */
- if ((outbuffer = apr_palloc(pool, 10240)) == NULL ||
- (inbuffer = apr_palloc(pool, 10240)) == NULL) {
+ if ((outbuffer = apr_palloc(pool, WRITE_BUF_SIZE)) == NULL ||
+ (inbuffer = apr_palloc(pool, READ_BUF_SIZE)) == NULL) {
return 1;
}
/* Set the buffers */
- apr_file_buffer_set(infile, inbuffer, 10240);
- apr_file_buffer_set(outfile, outbuffer, 10240);
+ apr_file_buffer_set(infile, inbuffer, READ_BUF_SIZE);
+ apr_file_buffer_set(outfile, outbuffer, WRITE_BUF_SIZE);
#endif
cache = apr_hash_make(pool);