Mailing List Archive

r3363 - in trunk/varnish-cache: bin/varnishd lib/libvcl
Author: phk
Date: 2008-11-09 14:46:57 +0100 (Sun, 09 Nov 2008)
New Revision: 3363

Modified:
trunk/varnish-cache/bin/varnishd/cache_acceptor.c
trunk/varnish-cache/bin/varnishd/cache_backend_poll.c
trunk/varnish-cache/bin/varnishd/cache_hash.c
trunk/varnish-cache/bin/varnishd/cache_http.c
trunk/varnish-cache/bin/varnishd/mgt_vcc.c
trunk/varnish-cache/bin/varnishd/stevedore.c
trunk/varnish-cache/bin/varnishd/storage_file.c
trunk/varnish-cache/lib/libvcl/vcc_token.c
Log:
Constifications requested by FlexeLint v9



Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_acceptor.c 2008-11-06 11:57:05 UTC (rev 3362)
+++ trunk/varnish-cache/bin/varnishd/cache_acceptor.c 2008-11-09 13:46:57 UTC (rev 3363)
@@ -49,7 +49,7 @@
#include "cache.h"
#include "cache_acceptor.h"

-static struct acceptor *vca_acceptors[] = {
+static struct acceptor * const vca_acceptors[] = {
#if defined(HAVE_KQUEUE)
&acceptor_kqueue,
#endif
@@ -63,7 +63,7 @@
NULL,
};

-static struct acceptor *vca_act;
+static struct acceptor const *vca_act;

static pthread_t vca_thread_acct;
static struct timeval tv_sndtimeo;

Modified: trunk/varnish-cache/bin/varnishd/cache_backend_poll.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_backend_poll.c 2008-11-06 11:57:05 UTC (rev 3362)
+++ trunk/varnish-cache/bin/varnishd/cache_backend_poll.c 2008-11-09 13:46:57 UTC (rev 3363)
@@ -86,7 +86,7 @@
static VTAILQ_HEAD(, vbp_target) vbp_list =
VTAILQ_HEAD_INITIALIZER(vbp_list);

-static char default_request[] =
+static const char default_request[] =
"GET / HTTP/1.1\r\n"
"Connection: close\r\n"
"\r\n";

Modified: trunk/varnish-cache/bin/varnishd/cache_hash.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_hash.c 2008-11-06 11:57:05 UTC (rev 3362)
+++ trunk/varnish-cache/bin/varnishd/cache_hash.c 2008-11-09 13:46:57 UTC (rev 3363)
@@ -66,7 +66,7 @@
#include "cache.h"
#include "stevedore.h"

-static struct hash_slinger *hash;
+static const struct hash_slinger *hash;

double
HSH_Grace(double g)

Modified: trunk/varnish-cache/bin/varnishd/cache_http.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_http.c 2008-11-06 11:57:05 UTC (rev 3362)
+++ trunk/varnish-cache/bin/varnishd/cache_http.c 2008-11-09 13:46:57 UTC (rev 3363)
@@ -65,7 +65,7 @@
LOGMTX2(ax, HTTP_HDR_FIRST, Header), \
}

-static enum shmlogtag logmtx[][HTTP_HDR_FIRST + 1] = {
+static const enum shmlogtag logmtx[][HTTP_HDR_FIRST + 1] = {
[HTTP_Rx] = LOGMTX1(Rx),
[HTTP_Tx] = LOGMTX1(Tx),
[HTTP_Obj] = LOGMTX1(Obj)

Modified: trunk/varnish-cache/bin/varnishd/mgt_vcc.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/mgt_vcc.c 2008-11-06 11:57:05 UTC (rev 3362)
+++ trunk/varnish-cache/bin/varnishd/mgt_vcc.c 2008-11-09 13:46:57 UTC (rev 3363)
@@ -78,7 +78,7 @@
/*
* Keep this in synch with man/vcl.7 and etc/default.vcl!
*/
-static const char *default_vcl =
+static const char * const default_vcl =
#include "default_vcl.h"
"" ;


Modified: trunk/varnish-cache/bin/varnishd/stevedore.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/stevedore.c 2008-11-06 11:57:05 UTC (rev 3362)
+++ trunk/varnish-cache/bin/varnishd/stevedore.c 2008-11-09 13:46:57 UTC (rev 3363)
@@ -40,7 +40,7 @@
static VTAILQ_HEAD(, stevedore) stevedores =
VTAILQ_HEAD_INITIALIZER(stevedores);

-static struct stevedore * volatile stv_next;
+static const struct stevedore * volatile stv_next;

struct storage *
STV_alloc(struct sess *sp, size_t size)

Modified: trunk/varnish-cache/bin/varnishd/storage_file.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/storage_file.c 2008-11-06 11:57:05 UTC (rev 3362)
+++ trunk/varnish-cache/bin/varnishd/storage_file.c 2008-11-09 13:46:57 UTC (rev 3363)
@@ -233,8 +233,8 @@
/* XXX: force block allocation here or in open ? */
}

-static char default_size[] = "50%";
-static char default_filename[] = ".";
+static const char default_size[] = "50%";
+static const char default_filename[] = ".";

static void
smf_init(struct stevedore *parent, int ac, char * const *av)

Modified: trunk/varnish-cache/lib/libvcl/vcc_token.c
===================================================================
--- trunk/varnish-cache/lib/libvcl/vcc_token.c 2008-11-06 11:57:05 UTC (rev 3362)
+++ trunk/varnish-cache/lib/libvcl/vcc_token.c 2008-11-09 13:46:57 UTC (rev 3363)
@@ -248,7 +248,7 @@
static int8_t
vcc_xdig(const char c)
{
- static const char *xdigit =
+ static const char * const xdigit =
"0123456789abcdef"
"0123456789ABCDEF";
const char *p;