From: phk Date: Mon, 21 Aug 2006 20:42:47 +0000 (+0000) Subject: Flexelint inpired cleanups X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a03706ab42a1d1edfba113e568fdf428dd7fb616;p=varnish Flexelint inpired cleanups git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@881 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishd/cache_acceptor.c b/varnish-cache/bin/varnishd/cache_acceptor.c index 39ee6975..037fa881 100644 --- a/varnish-cache/bin/varnishd/cache_acceptor.c +++ b/varnish-cache/bin/varnishd/cache_acceptor.c @@ -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); } } diff --git a/varnish-cache/bin/varnishd/cache_acceptor.h b/varnish-cache/bin/varnishd/cache_acceptor.h index 9813674c..345c7637 100644 --- a/varnish-cache/bin/varnishd/cache_acceptor.h +++ b/varnish-cache/bin/varnishd/cache_acceptor.h @@ -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); diff --git a/varnish-cache/bin/varnishd/mgt_child.c b/varnish-cache/bin/varnishd/mgt_child.c index d5bb8da4..84a39de0 100644 --- a/varnish-cache/bin/varnishd/mgt_child.c +++ b/varnish-cache/bin/varnishd/mgt_child.c @@ -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; /*--------------------------------------------------------------------*/ diff --git a/varnish-cache/bin/varnishd/mgt_vcc.c b/varnish-cache/bin/varnishd/mgt_vcc.c index 4d7f4f9d..996d8419 100644 --- a/varnish-cache/bin/varnishd/mgt_vcc.c +++ b/varnish-cache/bin/varnishd/mgt_vcc.c @@ -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;