Return-Path: Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: (qmail 94262 invoked from network); 19 Oct 2010 23:27:30 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 19 Oct 2010 23:27:30 -0000 Received: (qmail 43903 invoked by uid 500); 19 Oct 2010 23:27:30 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 43742 invoked by uid 500); 19 Oct 2010 23:27:30 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 43735 invoked by uid 99); 19 Oct 2010 23:27:30 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Oct 2010 23:27:30 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Oct 2010 23:27:28 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 245B6238890A; Tue, 19 Oct 2010 23:26:31 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1024465 - /httpd/httpd/trunk/modules/generators/mod_info.c Date: Tue, 19 Oct 2010 23:26:31 -0000 To: cvs@httpd.apache.org From: minfrin@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20101019232631.245B6238890A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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("
", 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) ("
Module Directives: none
", r); } - more_info = find_more_info(serv, modp->name); + more_info = find_more_info(r->server, modp->name); if (more_info) { ap_rputs ("
Additional Information:\n
",