httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n.@apache.org
Subject cvs commit: httpd-2.0/modules/mappers mod_rewrite.c
Date Mon, 28 Jul 2003 13:02:38 GMT
nd          2003/07/28 06:02:38

  Modified:    modules/mappers mod_rewrite.c
  Log:
  cleanup current_logtime function.
  use sizeof where sizeof should be used.
  don't compute strlen again and again (use the supplied value
  from apr_strftime instead).
  
  Revision  Changes    Path
  1.189     +3 -2      httpd-2.0/modules/mappers/mod_rewrite.c
  
  Index: mod_rewrite.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/mappers/mod_rewrite.c,v
  retrieving revision 1.188
  retrieving revision 1.189
  diff -u -r1.188 -r1.189
  --- mod_rewrite.c	28 Jul 2003 12:30:42 -0000	1.188
  +++ mod_rewrite.c	28 Jul 2003 13:02:37 -0000	1.189
  @@ -372,10 +372,11 @@
   
       apr_time_exp_lt(&t, apr_time_now());
   
  -    apr_strftime(tstr, &len, 80, "[%d/%b/%Y:%H:%M:%S ", &t);
  -    apr_snprintf(tstr + strlen(tstr), 80-strlen(tstr), "%c%.2d%.2d]",
  +    apr_strftime(tstr, &len, sizeof(tstr), "[%d/%b/%Y:%H:%M:%S ", &t);
  +    apr_snprintf(tstr+len, sizeof(tstr)-len, "%c%.2d%.2d]",
                    t.tm_gmtoff < 0 ? '-' : '+',
                    t.tm_gmtoff / (60*60), t.tm_gmtoff % (60*60));
  +
       return apr_pstrdup(r->pool, tstr);
   }
   
  
  
  

Mime
View raw message