Commit cb74e1d4 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Flexelint inpired cleanups


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@881 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 7d257423
...@@ -44,7 +44,7 @@ static struct acceptor *vca_act; ...@@ -44,7 +44,7 @@ static struct acceptor *vca_act;
static unsigned xids; static unsigned xids;
static pthread_t vca_thread_acct; static pthread_t vca_thread_acct;
struct sess * static struct sess *
vca_accept_sess(int fd) vca_accept_sess(int fd)
{ {
socklen_t l; socklen_t l;
...@@ -119,16 +119,6 @@ vca_handover(struct sess *sp, int bad) ...@@ -119,16 +119,6 @@ vca_handover(struct sess *sp, int bad)
WRK_QueueSession(sp); 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 int
...@@ -189,7 +179,11 @@ vca_acct(void *arg) ...@@ -189,7 +179,11 @@ vca_acct(void *arg)
if (sp == NULL) if (sp == NULL)
continue; continue;
http_RecvPrep(sp->http); 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);
} }
} }
......
...@@ -26,8 +26,6 @@ extern struct acceptor acceptor_poll; ...@@ -26,8 +26,6 @@ extern struct acceptor acceptor_poll;
#endif #endif
/* vca_acceptor.c */ /* vca_acceptor.c */
struct sess *vca_accept_sess(int fd);
void vca_handover(struct sess *sp, int bad); void vca_handover(struct sess *sp, int bad);
void vca_handfirst(struct sess *sp);
int vca_pollsession(struct sess *sp); int vca_pollsession(struct sess *sp);
...@@ -40,7 +40,7 @@ static enum { ...@@ -40,7 +40,7 @@ static enum {
CH_DIED = 4 CH_DIED = 4
} child_state = CH_STOPPED; } child_state = CH_STOPPED;
const char *ch_state[] = { static const char *ch_state[] = {
[CH_STOPPED] = "stopped", [CH_STOPPED] = "stopped",
[CH_STARTING] = "starting", [CH_STARTING] = "starting",
[CH_RUNNING] = "running", [CH_RUNNING] = "running",
...@@ -49,8 +49,8 @@ const char *ch_state[] = { ...@@ -49,8 +49,8 @@ const char *ch_state[] = {
}; };
struct evbase *mgt_evb; struct evbase *mgt_evb;
struct ev *ev_poker; static struct ev *ev_poker;
struct ev *ev_listen; static struct ev *ev_listen;
/*--------------------------------------------------------------------*/ /*--------------------------------------------------------------------*/
......
...@@ -122,7 +122,6 @@ mgt_vcc_default(const char *b_arg, const char *f_arg) ...@@ -122,7 +122,6 @@ mgt_vcc_default(const char *b_arg, const char *f_arg)
{ {
char *addr, *port; char *addr, *port;
char *buf, *vf; char *buf, *vf;
const char *p, *q;
struct vsb *sb; struct vsb *sb;
struct vclprog *vp; struct vclprog *vp;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment