From: Takashi Sato Date: Tue, 19 May 2009 12:26:14 +0000 (+0000) Subject: Kill the hardcoded values X-Git-Tag: 2.3.3~557 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a64da7de52febf691c59ac76431bebe5c974c8d3;p=thirdparty%2Fapache%2Fhttpd.git Kill the hardcoded values git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@776290 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/support/logresolve.c b/support/logresolve.c index e808acbff37..b99041a647d 100644 --- a/support/logresolve.c +++ b/support/logresolve.c @@ -68,6 +68,8 @@ #include #endif +#define LINE_BUF_SIZE 2048 + static apr_file_t *errfile; static const char *shortname = "logresolve"; static apr_hash_t *cache; @@ -143,7 +145,7 @@ int main(int argc, const char * const argv[]) char * inbuffer; char * outbuffer; #endif - char line[2048]; + char line[LINE_BUF_SIZE]; int doublelookups = 0; if (apr_app_initialize(&argc, &argv, NULL) != APR_SUCCESS) { @@ -204,7 +206,7 @@ int main(int argc, const char * const argv[]) cache = apr_hash_make(pool); - while (apr_file_gets(line, 2048, infile) == APR_SUCCESS) { + while (apr_file_gets(line, sizeof(line), infile) == APR_SUCCESS) { char dummy[] = " " APR_EOL_STR; if (line[0] == '\0') {