]> granicus.if.org Git - apache/commitdiff
Cast the constness away when the object is returned to the caller/owner of
authorBill Stoddard <stoddard@apache.org>
Mon, 6 May 2002 13:12:03 +0000 (13:12 +0000)
committerBill Stoddard <stoddard@apache.org>
Mon, 6 May 2002 13:12:03 +0000 (13:12 +0000)
the object.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94960 13f79535-47bb-0310-9956-ffa450edef68

modules/experimental/cache_hash.c

index f37863c495dc3f07c91c3deb7e6f922224126685..d74d2fe0fe4a127350a44033874d40d250eff1a8 100644 (file)
@@ -307,10 +307,10 @@ CACHE_DECLARE(void *) cache_hash_set(cache_hash_t *ht,
             tval = (*hep)->val;
             (*hep)->val = val;
         }
-        /* Return the object just removed from the cache
-         * to let the caller clean it up
+        /* Return the object just removed from the cache to let the 
+         * caller clean it up. Cast the constness away upon return.
          */
-        return tval;
+        return (void *) tval;
     }
     /* else key not present and val==NULL */
     return NULL;