You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by tr...@apache.org on 2002/04/09 13:18:41 UTC

cvs commit: httpd-2.0/modules/generators mod_status.c

trawick     02/04/09 04:18:41

  Modified:    modules/generators mod_status.c
  Log:
  move a loop-invariant computation out of the thread loop and
  at the same time quiet a gcc warning (it assumed that thread_limit
  could be zero, which would leave ps_record uninitialized when
  referenced after the end of the thread loop)
  
  Revision  Changes    Path
  1.66      +1 -1      httpd-2.0/modules/generators/mod_status.c
  
  Index: mod_status.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/generators/mod_status.c,v
  retrieving revision 1.65
  retrieving revision 1.66
  diff -u -r1.65 -r1.66
  --- mod_status.c	9 Apr 2002 01:55:44 -0000	1.65
  +++ mod_status.c	9 Apr 2002 11:18:41 -0000	1.66
  @@ -326,11 +326,11 @@
           return 0;
   
       for (i = 0; i < server_limit; ++i) {
  +        ps_record = ap_get_scoreboard_process(i);
           for (j = 0; j < thread_limit; ++j) {
               int indx = (i * thread_limit) + j;
   
               ws_record = ap_get_scoreboard_worker(i, j);
  -            ps_record = ap_get_scoreboard_process(i);
               res = ws_record->status;
               stat_buffer[indx] = status_flags[res];