r3599 - in branches/2.0/varnish-cache: bin/varnishd lib/libvarnish lib/libvcl

tfheen at projects.linpro.no tfheen at projects.linpro.no
Thu Feb 5 11:13:52 CET 2009


Author: tfheen
Date: 2009-02-05 11:13:52 +0100 (Thu, 05 Feb 2009)
New Revision: 3599

Modified:
   branches/2.0/varnish-cache/bin/varnishd/cache_expire.c
   branches/2.0/varnish-cache/bin/varnishd/mgt_child.c
   branches/2.0/varnish-cache/bin/varnishd/varnishd.c
   branches/2.0/varnish-cache/lib/libvarnish/crc32.c
   branches/2.0/varnish-cache/lib/libvcl/vcc_fixed_token.c
   branches/2.0/varnish-cache/lib/libvcl/vcc_priv.h
Log:
Merge r3364: More FlexeLint v9 consts



Modified: branches/2.0/varnish-cache/bin/varnishd/cache_expire.c
===================================================================
--- branches/2.0/varnish-cache/bin/varnishd/cache_expire.c	2009-02-05 10:10:58 UTC (rev 3598)
+++ branches/2.0/varnish-cache/bin/varnishd/cache_expire.c	2009-02-05 10:13:52 UTC (rev 3599)
@@ -69,8 +69,8 @@
  * housekeeping fields parts of an object.
  */
 
-static const char *tmr_prefetch	= "prefetch";
-static const char *tmr_ttl	= "ttl";
+static const char * const tmr_prefetch	= "prefetch";
+static const char * const tmr_ttl	= "ttl";
 
 struct objexp {
 	unsigned		magic;

Modified: branches/2.0/varnish-cache/bin/varnishd/mgt_child.c
===================================================================
--- branches/2.0/varnish-cache/bin/varnishd/mgt_child.c	2009-02-05 10:10:58 UTC (rev 3598)
+++ branches/2.0/varnish-cache/bin/varnishd/mgt_child.c	2009-02-05 10:13:52 UTC (rev 3599)
@@ -81,7 +81,7 @@
 	CH_DIED = 4
 }			child_state = CH_STOPPED;
 
-static const char *ch_state[] = {
+static const char * const ch_state[] = {
 	[CH_STOPPED] =	"stopped",
 	[CH_STARTING] =	"starting",
 	[CH_RUNNING] =	"running",

Modified: branches/2.0/varnish-cache/bin/varnishd/varnishd.c
===================================================================
--- branches/2.0/varnish-cache/bin/varnishd/varnishd.c	2009-02-05 10:10:58 UTC (rev 3598)
+++ branches/2.0/varnish-cache/bin/varnishd/varnishd.c	2009-02-05 10:13:52 UTC (rev 3599)
@@ -117,7 +117,7 @@
 extern struct stevedore smu_stevedore;
 #endif
 
-static struct choice stv_choice[] = {
+static const struct choice stv_choice[] = {
 	{ "file",	&smf_stevedore },
 	{ "malloc",	&sma_stevedore },
 #ifdef HAVE_LIBUMEM
@@ -158,7 +158,7 @@
 extern struct hash_slinger hsl_slinger;
 extern struct hash_slinger hcl_slinger;
 
-static struct choice hsh_choice[] = {
+static const struct choice hsh_choice[] = {
 	{ "classic",		&hcl_slinger },
 	{ "simple",		&hsl_slinger },
 	{ "simple_list",	&hsl_slinger },	/* backwards compat */

Modified: branches/2.0/varnish-cache/lib/libvarnish/crc32.c
===================================================================
--- branches/2.0/varnish-cache/lib/libvarnish/crc32.c	2009-02-05 10:10:58 UTC (rev 3598)
+++ branches/2.0/varnish-cache/lib/libvarnish/crc32.c	2009-02-05 10:13:52 UTC (rev 3599)
@@ -37,7 +37,7 @@
 
 /*--------------------------------------------------------------------*/
 
-static uint32_t crc32bits[] = {
+static const uint32_t crc32bits[] = {
     0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f,
     0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988,
     0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, 0x1db71064, 0x6ab020f2,

Modified: branches/2.0/varnish-cache/lib/libvcl/vcc_fixed_token.c
===================================================================
--- branches/2.0/varnish-cache/lib/libvcl/vcc_fixed_token.c	2009-02-05 10:10:58 UTC (rev 3598)
+++ branches/2.0/varnish-cache/lib/libvcl/vcc_fixed_token.c	2009-02-05 10:13:52 UTC (rev 3599)
@@ -104,7 +104,7 @@
 	}
 }
 
-const char *vcl_tnames[256] = {
+const char * const vcl_tnames[256] = {
 	['!'] = "'!'",
 	['%'] = "'%'",
 	['&'] = "'&'",

Modified: branches/2.0/varnish-cache/lib/libvcl/vcc_priv.h
===================================================================
--- branches/2.0/varnish-cache/lib/libvcl/vcc_priv.h	2009-02-05 10:10:58 UTC (rev 3598)
+++ branches/2.0/varnish-cache/lib/libvcl/vcc_priv.h	2009-02-05 10:13:52 UTC (rev 3599)
@@ -39,7 +39,7 @@
 #define isident(c) (isalpha(c) || isdigit(c) || (c) == '_' || (c) == '-')
 #define isvar(c) (isident(c) || (c) == '.')
 unsigned vcl_fixed_token(const char *p, const char **q);
-extern const char *vcl_tnames[256];
+extern const char * const vcl_tnames[256];
 void vcl_output_lang_h(struct vsb *sb);
 
 #define PF(t)	(int)((t)->e - (t)->b), (t)->b



More information about the varnish-commit mailing list