]> err.no Git - varnish/commitdiff
Constifications requested by FlexeLint v9
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sun, 9 Nov 2008 13:46:57 +0000 (13:46 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sun, 9 Nov 2008 13:46:57 +0000 (13:46 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3363 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/cache_acceptor.c
varnish-cache/bin/varnishd/cache_backend_poll.c
varnish-cache/bin/varnishd/cache_hash.c
varnish-cache/bin/varnishd/cache_http.c
varnish-cache/bin/varnishd/mgt_vcc.c
varnish-cache/bin/varnishd/stevedore.c
varnish-cache/bin/varnishd/storage_file.c
varnish-cache/lib/libvcl/vcc_token.c

index 119eda7726df0accee0f0b1e38031920eb76df46..65955e177386d0ad7aa03e3d15b5a0cd13370010 100644 (file)
@@ -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 @@ static struct acceptor *vca_acceptors[] = {
        NULL,
 };
 
-static struct acceptor *vca_act;
+static struct acceptor const *vca_act;
 
 static pthread_t       vca_thread_acct;
 static struct timeval  tv_sndtimeo;
index 7a812ddf602d9d652a3036d30bbbd935b1debdfa..6f46762567865d1f208c7b9276ed7a812321ea41 100644 (file)
@@ -86,7 +86,7 @@ struct vbp_target {
 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";
index 72090082572293ce664b035e42ae670d5bfe2620..2ad9551ad3c0c59acec813451ee04c9e420f7287 100644 (file)
@@ -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)
index 18ba655ac102ed5acdeeb8cb57ee819935f42ae9..ee6d47e270e8fb769b040424ae4d48013e1632e2 100644 (file)
@@ -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)
index 0c2d8402b52d7c06183d427b0ef2bd59e1c588a3..4c122f952378ef93571a09d525422b92f85823d7 100644 (file)
@@ -78,7 +78,7 @@ char *mgt_cc_cmd;
 /*
  * 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"
     "" ;
 
index d3c4b3c3ad43cc67d91b0a03b5546a561bbbf893..fa89cf1c370c6ac8dd8d3c37c4ac1d1c56704625 100644 (file)
@@ -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)
index 08a2ae483efc1cad8ea8aeeb4dba33da9cf41053..895c2fbe7ad0a086084fc4fcf1acfcf03790c320 100644 (file)
@@ -233,8 +233,8 @@ smf_initfile(struct smf_sc *sc, const char *size, int newfile)
        /* 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)
index 76e1f528056db95a9c7659cec5863c37a195e13a..28811c0d9860c05d97caa15251dcba854525010f 100644 (file)
@@ -248,7 +248,7 @@ vcc_ExpectCid(struct tokenlist *tl)
 static int8_t
 vcc_xdig(const char c)
 {
-       static const char *xdigit =
+       static const char * const xdigit =
            "0123456789abcdef"
            "0123456789ABCDEF";
        const char *p;