[3.0] d57f12d This cast is a tad too creative for my taste, make it safer.

Tollef Fog Heen tfheen at varnish-cache.org
Thu Sep 22 14:03:48 CEST 2011


commit d57f12d9c73f240fda943e5ad3bfedb381ab6ead
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Tue Sep 20 13:55:51 2011 +0000

    This cast is a tad too creative for my taste, make it safer.

diff --git a/bin/varnishd/cache_vrt_re.c b/bin/varnishd/cache_vrt_re.c
index 9c6cb99..8e1218a 100644
--- a/bin/varnishd/cache_vrt_re.c
+++ b/bin/varnishd/cache_vrt_re.c
@@ -59,8 +59,11 @@ VRT_re_init(void **rep, const char *re)
 void
 VRT_re_fini(void *rep)
 {
+	vre_t *vv;
+
+	vv = rep;
 	if (rep != NULL)
-		VRE_free((vre_t**)&rep);
+		VRE_free(&vv);
 }
 
 int



More information about the varnish-commit mailing list