httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From minf...@apache.org
Subject svn commit: r1024462 - /httpd/httpd/trunk/modules/generators/mod_status.c
Date Tue, 19 Oct 2010 23:11:58 GMT
Author: minfrin
Date: Tue Oct 19 23:11:58 2010
New Revision: 1024462

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

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

Modified: httpd/httpd/trunk/modules/generators/mod_status.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/generators/mod_status.c?rev=1024462&r1=1024461&r2=1024462&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/generators/mod_status.c (original)
+++ httpd/httpd/trunk/modules/generators/mod_status.c Tue Oct 19 23:11:58 2010
@@ -187,10 +187,6 @@ static int status_handler(request_rec *r
     apr_off_t bytes, my_bytes, conn_bytes;
     apr_off_t bcount, kbcount;
     long req_time;
-#ifdef HAVE_TIMES
-    float tick;
-    int times_per_thread = getpid() != child_pid;
-#endif
     int short_report;
     int no_table_report;
     worker_score *ws_record;
@@ -199,12 +195,20 @@ static int status_handler(request_rec *r
     pid_t *pid_buffer, worker_pid;
     clock_t tu, ts, tcu, tcs;
     ap_generation_t mpm_generation, worker_generation;
+#ifdef HAVE_TIMES
+    float tick;
+    int times_per_thread;
+#endif
 
-    if (strcmp(r->handler, STATUS_MAGIC_TYPE) &&
-        strcmp(r->handler, "server-status")) {
+    if (strcmp(r->handler, STATUS_MAGIC_TYPE) && strcmp(r->handler,
+            "server-status")) {
         return DECLINED;
     }
 
+#ifdef HAVE_TIMES
+    times_per_thread = getpid() != child_pid;
+#endif
+
     ap_mpm_query(AP_MPMQ_GENERATION, &mpm_generation);
 
 #ifdef HAVE_TIMES



Mime
View raw message