]> err.no Git - varnish/commitdiff
Flexelint inpired cleanups
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Mon, 21 Aug 2006 20:42:47 +0000 (20:42 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Mon, 21 Aug 2006 20:42:47 +0000 (20:42 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@881 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/cache_acceptor.c
varnish-cache/bin/varnishd/cache_acceptor.h
varnish-cache/bin/varnishd/mgt_child.c
varnish-cache/bin/varnishd/mgt_vcc.c

index 39ee69753f4806a95eb7085174fee011490b419a..037fa88103b96fcae87274bbf45f6ce8afa7b6fd 100644 (file)
@@ -44,7 +44,7 @@ static struct acceptor *vca_act;
 static unsigned                xids;
 static pthread_t       vca_thread_acct;
 
-struct sess *
+static struct sess *
 vca_accept_sess(int fd)
 {
        socklen_t l;
@@ -119,16 +119,6 @@ vca_handover(struct sess *sp, int bad)
        WRK_QueueSession(sp);
 }
 
-void
-vca_handfirst(struct sess *sp)
-{
-       sp->step = STP_FIRST;
-       VSL_stats->client_req++;
-       sp->xid = xids++;
-       VSL(SLT_ReqStart, sp->fd, "XID %u", sp->xid);
-       WRK_QueueSession(sp);
-}
-
 /*--------------------------------------------------------------------*/
 
 int
@@ -189,7 +179,11 @@ vca_acct(void *arg)
                if (sp == NULL)
                        continue;
                http_RecvPrep(sp->http);
-               vca_handfirst(sp);
+               sp->step = STP_FIRST;
+               VSL_stats->client_req++;
+               sp->xid = xids++;
+               VSL(SLT_ReqStart, sp->fd, "XID %u", sp->xid);
+               WRK_QueueSession(sp);
        }
 }
 
index 9813674ccad351f0867e417666cff321e2d19eda..345c7637748ac7d14cf9203fed1e146fec387551 100644 (file)
@@ -26,8 +26,6 @@ extern struct acceptor acceptor_poll;
 #endif
 
 /* vca_acceptor.c */
-struct sess *vca_accept_sess(int fd);
 void vca_handover(struct sess *sp, int bad);
-void vca_handfirst(struct sess *sp);
 int vca_pollsession(struct sess *sp);
 
index d5bb8da400d0ff58483c64fdea83c667b15793ee..84a39de072210d0a249f36f32fd418309f8e130b 100644 (file)
@@ -40,7 +40,7 @@ static enum {
        CH_DIED = 4
 }                      child_state = CH_STOPPED;
 
-const char *ch_state[] = {
+static const char *ch_state[] = {
        [CH_STOPPED] =  "stopped",
        [CH_STARTING] = "starting",
        [CH_RUNNING] =  "running",
@@ -49,8 +49,8 @@ const char *ch_state[] = {
 };
 
 struct evbase          *mgt_evb;
-struct ev              *ev_poker;
-struct ev              *ev_listen;
+static struct ev       *ev_poker;
+static struct ev       *ev_listen;
 
 /*--------------------------------------------------------------------*/
 
index 4d7f4f9dc0a7255e0a23d9af349864e65e7dd919..996d8419dfcdaf8f1b86027578c3335d328abe12 100644 (file)
@@ -122,7 +122,6 @@ mgt_vcc_default(const char *b_arg, const char *f_arg)
 {
        char *addr, *port;
        char *buf, *vf;
-       const char *p, *q;
        struct vsb *sb;
        struct vclprog *vp;