httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gst...@locus.apache.org
Subject cvs commit: apache-2.0/src/lib/apr/lib apr_hash.c
Date Thu, 13 Jul 2000 12:06:50 GMT
gstein      00/07/13 05:06:49

  Modified:    src/lib/apr/lib apr_hash.c
  Log:
  fix apr_hash_set() -- it wasn't replacing values
  
  Revision  Changes    Path
  1.6       +11 -3     apache-2.0/src/lib/apr/lib/apr_hash.c
  
  Index: apr_hash.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/lib/apr_hash.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- apr_hash.c	2000/07/10 02:58:20	1.5
  +++ apr_hash.c	2000/07/13 12:06:48	1.6
  @@ -272,7 +272,15 @@
   {
       ap_hash_entry_t **hep;
       hep = find_entry(ht, key, klen, val);
  -    if (*hep && !val)
  -	/* delete entry */
  -	*hep = (*hep)->next;
  +    if (*hep) {
  +        if (!val) {
  +            /* delete entry */
  +            *hep = (*hep)->next;
  +        }
  +        else {
  +            /* replace entry */
  +            (*hep)->val = val;
  +        }
  +    }
  +    /* else key not present and val==NULL */
   }
  
  
  

Mime
View raw message