tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject cvs commit: jakarta-tomcat-connectors/jk/native/common jk_uri_worker_map.c
Date Mon, 11 Apr 2005 06:41:24 GMT
mturk       2005/04/10 23:41:24

  Modified:    jk/native/common jk_uri_worker_map.c
  Log:
  Fix compile warnings about unused function and undefined operation.
  
  Revision  Changes    Path
  1.52      +4 -16     jakarta-tomcat-connectors/jk/native/common/jk_uri_worker_map.c
  
  Index: jk_uri_worker_map.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_uri_worker_map.c,v
  retrieving revision 1.51
  retrieving revision 1.52
  diff -u -r1.51 -r1.52
  --- jk_uri_worker_map.c	28 Mar 2005 06:34:09 -0000	1.51
  +++ jk_uri_worker_map.c	11 Apr 2005 06:41:24 -0000	1.52
  @@ -360,18 +360,6 @@
       return rc;
   }
   
  -/* returns the index of the last occurrence of the 'ch' character
  -   if ch=='\0' returns the length of the string str  */
  -static int last_index_of(const char *str, char ch)
  -{
  -    const char *str_minus_one = str - 1;
  -    const char *s = str + strlen(str);
  -    while (s != str_minus_one && ch != *s) {
  -        --s;
  -    }
  -    return (s - str);
  -}
  -
   static int is_nomap_match(jk_uri_worker_map_t *uw_map,
                             const char *uri, const char* worker,
                             jk_logger_t *l)
  @@ -539,15 +527,15 @@
               if (strchr(u, '|')) {
                   char *s, *r = strdup(u);
                   s = strchr(r, '|');
  -                *s = '\0';
  +                *(s++) = '\0';
                   /* Add first mapping */
                   if (!uri_worker_map_add(uw_map, r, w, l)) {
                       jk_log(l, JK_LOG_ERROR,
                       "invalid mapping rule %s->%s", r, w);
                   }
                   s++;
  -                while (*s)
  -                   *(s - 1) = *s++;
  +                for (; *s; s++)
  +                   *(s - 1) = *s;
                   *(s - 1) = '\0';
                   /* add second mapping */
                   if (!uri_worker_map_add(uw_map, r, w, l)) {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message