apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject cvs commit: apr/tables apr_hash.c
Date Mon, 19 Apr 2004 11:44:38 GMT
trawick     2004/04/19 04:44:38

  Modified:    tables   apr_hash.c
  Log:
  fix some unsigned char/signed char discrepancies
  
  Revision  Changes    Path
  1.40      +3 -2      apr/tables/apr_hash.c
  
  Index: apr_hash.c
  ===================================================================
  RCS file: /home/cvs/apr/tables/apr_hash.c,v
  retrieving revision 1.39
  retrieving revision 1.40
  diff -u -r1.39 -r1.40
  --- apr_hash.c	19 Apr 2004 08:54:48 -0000	1.39
  +++ apr_hash.c	19 Apr 2004 11:44:37 -0000	1.40
  @@ -172,9 +172,10 @@
       ht->max = new_max;
   }
   
  -unsigned int apr_hashfunc_default(const char *key, apr_ssize_t *klen)
  +unsigned int apr_hashfunc_default(const char *char_key, apr_ssize_t *klen)
   {
       unsigned int hash = 0;
  +    const unsigned char *key = (const unsigned char *)char_key;
       const unsigned char *p;
       apr_ssize_t i;
       
  @@ -220,7 +221,7 @@
           for (p = key; *p; p++) {
               hash = hash * 33 + *p;
           }
  -        *klen = p - (const unsigned char *)key;
  +        *klen = p - key;
       }
       else {
           for (p = key, i = *klen; i; i--, p++) {
  
  
  

Mime
View raw message