Commit 0d98fd4a authored by Colm MacCarthaigh's avatar Colm MacCarthaigh
Browse files

Logresolve style and nit fix-ups:

   * Remove some redundant whitespace in variable declarations. 
   * Add some whitespace for clarity around an if and a while statement. 
   * Remove redundant and unneccessary casts
   * Use APR_HASH_KEY_STRING



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@328048 13f79535-47bb-0310-9956-ffa450edef68
parent 8fed3ed4
Loading
Loading
Loading
Loading
+7 −8
Changes for support/logresolve.c: 7 added lines, 8 removed lines.
Original line number Diff line number Diff line
@@ -225,8 +225,7 @@ int main(int argc, const char * const argv[])
        }

        /* See if we have it in our cache */
        hostname = (char *) apr_hash_get(cache, (const void *)line, 
                                         strlen(line));
        hostname = (char *) apr_hash_get(cache, line, APR_HASH_KEY_STRING);
        if (hostname) {
            apr_file_printf(outfile, "%s %s", hostname, space + 1);
	        cachehits++;
@@ -264,8 +263,8 @@ int main(int argc, const char * const argv[])

            /* Add to cache */
            *space = '\0';
            apr_hash_set(cache, (const void *) line, strlen(line), 
                         (const void *) apr_pstrdup(pool, line));
            apr_hash_set(cache, line, APR_HASH_KEY_STRING, 
                         apr_pstrdup(pool, line));
            continue;
        }

@@ -285,8 +284,8 @@ int main(int argc, const char * const argv[])

                /* Add to cache */
                *space = '\0';
                apr_hash_set(cache, (const void *) line, strlen(line), 
                             (const void *) apr_pstrdup(pool, line));
                apr_hash_set(cache, line, APR_HASH_KEY_STRING, 
                             apr_pstrdup(pool, line));
                continue;
            }
        }
@@ -295,8 +294,8 @@ int main(int argc, const char * const argv[])
        apr_file_printf(outfile, "%s %s", hostname, space + 1);

        /* Store it in the cache */
        apr_hash_set(cache, (const void *) line, strlen(line), 
                     (const void *) apr_pstrdup(pool, hostname));
        apr_hash_set(cache, line, APR_HASH_KEY_STRING, 
                     apr_pstrdup(pool, hostname));
    }

    /* Flush any remaining output */