]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Declare the local variables in the more inner scope.
authorTakashi Sato <takashi@apache.org>
Mon, 25 May 2009 14:40:15 +0000 (14:40 +0000)
committerTakashi Sato <takashi@apache.org>
Mon, 25 May 2009 14:40:15 +0000 (14:40 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@778431 13f79535-47bb-0310-9956-ffa450edef68

support/logresolve.c

index b99041a647d23e5a518b6ddfb985da296d99cf21..770edd3322a8ee18014078dfde0fa511892393a1 100644 (file)
@@ -130,17 +130,11 @@ int main(int argc, const char * const argv[])
 {
     apr_file_t * outfile;
     apr_file_t * infile;
-    apr_file_t * statsfile;
-    apr_sockaddr_t * ip;
-    apr_sockaddr_t * ipdouble;
     apr_getopt_t * o;
     apr_pool_t * pool;
     apr_status_t status;
     const char * arg;
-    char opt;
     char * stats = NULL;
-    char * space;
-    char * hostname;
 #if APR_MAJOR_VERSION > 1 || (APR_MAJOR_VERSION == 1 && APR_MINOR_VERSION >= 3)
     char * inbuffer;
     char * outbuffer;
@@ -164,6 +158,7 @@ int main(int argc, const char * const argv[])
     apr_getopt_init(&o, pool, argc, argv);
 
     while (1) {
+        char opt;
         status = apr_getopt(o, "s:c", &opt, &arg);
         if (status == APR_EOF) {
             break;
@@ -207,6 +202,10 @@ int main(int argc, const char * const argv[])
     cache = apr_hash_make(pool);
 
     while (apr_file_gets(line, sizeof(line), infile) == APR_SUCCESS) {
+        char *hostname;
+        char *space;
+        apr_sockaddr_t *ip;
+        apr_sockaddr_t *ipdouble;
         char dummy[] = " " APR_EOL_STR;
 
         if (line[0] == '\0') {
@@ -309,6 +308,7 @@ int main(int argc, const char * const argv[])
     apr_file_flush(outfile);
 
     if (stats) {
+        apr_file_t *statsfile;
         if (apr_file_open(&statsfile, stats,
                        APR_FOPEN_WRITE | APR_FOPEN_CREATE | APR_FOPEN_TRUNCATE,
                           APR_OS_DEFAULT, pool) != APR_SUCCESS) {