Mailing List Archive

r881 - trunk/varnish-cache/bin/varnishd
Author: phk
Date: 2006-08-21 22:42:47 +0200 (Mon, 21 Aug 2006)
New Revision: 881

Modified:
trunk/varnish-cache/bin/varnishd/cache_acceptor.c
trunk/varnish-cache/bin/varnishd/cache_acceptor.h
trunk/varnish-cache/bin/varnishd/mgt_child.c
trunk/varnish-cache/bin/varnishd/mgt_vcc.c
Log:
Flexelint inpired cleanups


Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_acceptor.c 2006-08-21 20:30:29 UTC (rev 880)
+++ trunk/varnish-cache/bin/varnishd/cache_acceptor.c 2006-08-21 20:42:47 UTC (rev 881)
@@ -44,7 +44,7 @@
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 @@
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 @@
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);
}
}


Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor.h
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_acceptor.h 2006-08-21 20:30:29 UTC (rev 880)
+++ trunk/varnish-cache/bin/varnishd/cache_acceptor.h 2006-08-21 20:42:47 UTC (rev 881)
@@ -26,8 +26,6 @@
#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);


Modified: trunk/varnish-cache/bin/varnishd/mgt_child.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/mgt_child.c 2006-08-21 20:30:29 UTC (rev 880)
+++ trunk/varnish-cache/bin/varnishd/mgt_child.c 2006-08-21 20:42:47 UTC (rev 881)
@@ -40,7 +40,7 @@
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 @@
};

struct evbase *mgt_evb;
-struct ev *ev_poker;
-struct ev *ev_listen;
+static struct ev *ev_poker;
+static struct ev *ev_listen;

/*--------------------------------------------------------------------*/


Modified: trunk/varnish-cache/bin/varnishd/mgt_vcc.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/mgt_vcc.c 2006-08-21 20:30:29 UTC (rev 880)
+++ trunk/varnish-cache/bin/varnishd/mgt_vcc.c 2006-08-21 20:42:47 UTC (rev 881)
@@ -122,7 +122,6 @@
{
char *addr, *port;
char *buf, *vf;
- const char *p, *q;
struct vsb *sb;
struct vclprog *vp;