[master] 7a8dc37 polish

Poul-Henning Kamp phk at FreeBSD.org
Tue May 23 21:41:06 CEST 2017


commit 7a8dc379a711bd7178c292ba0cd4e390c01b9779
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Tue May 23 19:40:48 2017 +0000

    polish

diff --git a/bin/varnishd/cache/cache_shmlog.c b/bin/varnishd/cache/cache_shmlog.c
index 84a6b47..6bf507d 100644
--- a/bin/varnishd/cache/cache_shmlog.c
+++ b/bin/varnishd/cache/cache_shmlog.c
@@ -513,6 +513,7 @@ VSC_Alloc(const char *nm, size_t sd,
 	assert(Z_STREAM_END == inflate(&vz, Z_FINISH));
 	assert(Z_OK == inflateEnd(&vz));
 	ALLOC_OBJ(vsg, VSC_SEGS_MAGIC);
+	AN(vsg);
 	vsg->seg = p;
 	vsg->ptr = p + 8;
 	VTAILQ_INSERT_TAIL(&vsc_seglist, vsg, list);
@@ -520,7 +521,7 @@ VSC_Alloc(const char *nm, size_t sd,
 }
 
 void
-VSC_Destroy(const char *nm, void *p)
+VSC_Destroy(const char *nm, const void *p)
 {
 	struct vsc_segs *vsg;
 
diff --git a/bin/varnishd/common/common.h b/bin/varnishd/common/common.h
index 2fbe5d2..a6bbbbb 100644
--- a/bin/varnishd/common/common.h
+++ b/bin/varnishd/common/common.h
@@ -93,7 +93,7 @@ void VSM_common_ageupdate(const struct vsm_sc *sc);
 
 void *VSC_Alloc(const char *, size_t, size_t, const unsigned char *, size_t,
     const char *, va_list);
-void VSC_Destroy(const char *, void *);
+void VSC_Destroy(const char *, const void *);
 
 /* mgt_cli.c */
 extern struct VCLS	*mgt_cls;



More information about the varnish-commit mailing list