From: Bill Stoddard Date: Mon, 6 May 2002 13:12:03 +0000 (+0000) Subject: Cast the constness away when the object is returned to the caller/owner of X-Git-Tag: 2.0.37~488 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a9164f7b683bcb5781dfc8e2a9e8f9a2d76fb107;p=apache Cast the constness away when the object is returned to the caller/owner of the object. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94960 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/experimental/cache_hash.c b/modules/experimental/cache_hash.c index f37863c495..d74d2fe0fe 100644 --- a/modules/experimental/cache_hash.c +++ b/modules/experimental/cache_hash.c @@ -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;