From: Graham Leggett Date: Tue, 19 Oct 2010 23:11:58 +0000 (+0000) Subject: Avoid unnecessariy initialisation before we test mod_status's handler name. X-Git-Tag: 2.3.9~259 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=47399a26013fa01aa808ca9abd10d4bb00facc3b;p=apache Avoid unnecessariy initialisation before we test mod_status's handler name. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1024462 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/generators/mod_status.c b/modules/generators/mod_status.c index 0a44f02c92..ffb07ec8cf 100644 --- a/modules/generators/mod_status.c +++ b/modules/generators/mod_status.c @@ -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