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 Thu, 24 Jul 2003 19:50:45 GMT
nd          2003/07/24 12:50:45

  Modified:    modules/mappers mod_rewrite.c
  Log:
  minor optimization.
  this avoids a variable on stack and some internal
  pointer operations.
  
  Revision  Changes    Path
  1.171     +3 -3      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.170
  retrieving revision 1.171
  diff -u -r1.170 -r1.171
  --- mod_rewrite.c	24 Jul 2003 19:39:11 -0000	1.170
  +++ mod_rewrite.c	24 Jul 2003 19:50:45 -0000	1.171
  @@ -898,15 +898,15 @@
                                                              void *,
                                                              char *, char *))
   {
  -    apr_size_t last = strlen(key) - 1;
       char *val, *nextp, *endp;
       const char *err;
   
  -    if (*key != '[' || key[last] != ']') {
  +    endp = key + strlen(key) - 1;
  +    if (*key != '[' || *endp != ']') {
           return "RewriteCond: bad flag delimiters";
       }
   
  -    key[last] = ','; /* for simpler parsing */
  +    *endp = ','; /* for simpler parsing */
       ++key;
   
       while (*key) {
  
  
  

Mime
View raw message