httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From minf...@apache.org
Subject svn commit: r1024465 - /httpd/httpd/trunk/modules/generators/mod_info.c
Date Tue, 19 Oct 2010 23:26:31 GMT
Author: minfrin
Date: Tue Oct 19 23:26:30 2010
New Revision: 1024465

URL: http://svn.apache.org/viewvc?rev=1024465&view=rev
Log:
Avoid unnecessariy initialisation before we test mod_info's handler name.

Modified:
    httpd/httpd/trunk/modules/generators/mod_info.c

Modified: httpd/httpd/trunk/modules/generators/mod_info.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/generators/mod_info.c?rev=1024465&r1=1024464&r2=1024465&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/generators/mod_info.c (original)
+++ httpd/httpd/trunk/modules/generators/mod_info.c Tue Oct 19 23:26:30 2010
@@ -595,18 +595,18 @@ static int show_active_hooks(request_rec
 
 static int display_info(request_rec * r)
 {
-    module *modp = NULL;
-    server_rec *serv = r->server;
+    module *modp;
     const char *more_info;
-    const command_rec *cmd = NULL;
-    int comma = 0;
+    const command_rec *cmd;
 
-    if (strcmp(r->handler, "server-info"))
+    if (strcmp(r->handler, "server-info")) {
         return DECLINED;
+    }
 
     r->allowed |= (AP_METHOD_BIT << M_GET);
-    if (r->method_number != M_GET)
+    if (r->method_number != M_GET) {
         return DECLINED;
+    }
 
     ap_set_content_type(r, "text/html; charset=ISO-8859-1");
 
@@ -657,6 +657,7 @@ static int display_info(request_rec * r)
             ap_rputs("</dl><hr />", r);
         }
         else {
+            int comma = 0;
             for (modp = ap_top_module; modp; modp = modp->next) {
                 if (!r->args || !strcasecmp(modp->name, r->args)) {
                     ap_rprintf(r,
@@ -742,7 +743,7 @@ static int display_info(request_rec * r)
                             ("<dt><strong>Module Directives:</strong> <tt>none</tt></dt>",
                              r);
                     }
-                    more_info = find_more_info(serv, modp->name);
+                    more_info = find_more_info(r->server, modp->name);
                     if (more_info) {
                         ap_rputs
                             ("<dt><strong>Additional Information:</strong>\n</dt><dd>",



Mime
View raw message