r4833 - trunk/varnish-cache/bin/varnishd

phk at varnish-cache.org phk at varnish-cache.org
Thu May 20 09:24:36 CEST 2010


Author: phk
Date: 2010-05-20 09:24:36 +0200 (Thu, 20 May 2010)
New Revision: 4833

Modified:
   trunk/varnish-cache/bin/varnishd/stevedore.h
   trunk/varnish-cache/bin/varnishd/storage_file.c
   trunk/varnish-cache/bin/varnishd/storage_malloc.c
   trunk/varnish-cache/bin/varnishd/storage_persistent.c
   trunk/varnish-cache/bin/varnishd/storage_umem.c
Log:
Constify.



Modified: trunk/varnish-cache/bin/varnishd/stevedore.h
===================================================================
--- trunk/varnish-cache/bin/varnishd/stevedore.h	2010-05-20 07:24:18 UTC (rev 4832)
+++ trunk/varnish-cache/bin/varnishd/stevedore.h	2010-05-20 07:24:36 UTC (rev 4833)
@@ -87,10 +87,10 @@
 /* Synthetic Storage */
 void SMS_Init(void);
 
-extern struct stevedore sma_stevedore;
-extern struct stevedore smf_stevedore;
-extern struct stevedore smp_stevedore;
+extern const struct stevedore sma_stevedore;
+extern const struct stevedore smf_stevedore;
+extern const struct stevedore smp_stevedore;
 #ifdef HAVE_LIBUMEM
-extern struct stevedore smu_stevedore;
+extern const struct stevedore smu_stevedore;
 #endif
 

Modified: trunk/varnish-cache/bin/varnishd/storage_file.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/storage_file.c	2010-05-20 07:24:18 UTC (rev 4832)
+++ trunk/varnish-cache/bin/varnishd/storage_file.c	2010-05-20 07:24:36 UTC (rev 4833)
@@ -541,7 +541,7 @@
 
 /*--------------------------------------------------------------------*/
 
-struct stevedore smf_stevedore = {
+const struct stevedore smf_stevedore = {
 	.magic	=	STEVEDORE_MAGIC,
 	.name	=	"file",
 	.init	=	smf_init,

Modified: trunk/varnish-cache/bin/varnishd/storage_malloc.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/storage_malloc.c	2010-05-20 07:24:18 UTC (rev 4832)
+++ trunk/varnish-cache/bin/varnishd/storage_malloc.c	2010-05-20 07:24:36 UTC (rev 4833)
@@ -189,7 +189,7 @@
 	Lck_New(&sma_sc->sma_mtx);
 }
 
-struct stevedore sma_stevedore = {
+const struct stevedore sma_stevedore = {
 	.magic	=	STEVEDORE_MAGIC,
 	.name	=	"malloc",
 	.init	=	sma_init,

Modified: trunk/varnish-cache/bin/varnishd/storage_persistent.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/storage_persistent.c	2010-05-20 07:24:18 UTC (rev 4832)
+++ trunk/varnish-cache/bin/varnishd/storage_persistent.c	2010-05-20 07:24:36 UTC (rev 4833)
@@ -1497,7 +1497,7 @@
 
 /*--------------------------------------------------------------------*/
 
-struct stevedore smp_stevedore = {
+const struct stevedore smp_stevedore = {
 	.magic	=	STEVEDORE_MAGIC,
 	.name	=	"persistent",
 	.init	=	smp_init,

Modified: trunk/varnish-cache/bin/varnishd/storage_umem.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/storage_umem.c	2010-05-20 07:24:18 UTC (rev 4832)
+++ trunk/varnish-cache/bin/varnishd/storage_umem.c	2010-05-20 07:24:36 UTC (rev 4833)
@@ -161,7 +161,7 @@
 	AZ(pthread_mutex_init(&smu_mtx, NULL));
 }
 
-struct stevedore smu_stevedore = {
+const struct stevedore smu_stevedore = {
 	.magic	=	STEVEDORE_MAGIC,
 	.name	=	"umem",
 	.init	=	smu_init,




More information about the varnish-commit mailing list