Commit 2d613eef authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

White-space cleanup



git-svn-id: http://www.varnish-cache.org/svn/trunk@4556 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent ef62421b
......@@ -99,7 +99,7 @@ VBE_ReleaseConn(struct vbe_conn *vc)
if (dst == 0.0) \
dst = params->tmx; \
} while (0)
/*--------------------------------------------------------------------
* Attempt to connect to a given addrinfo entry.
......
......@@ -1218,7 +1218,7 @@ CNT_Session(struct sess *sp)
TCP_blocking(sp->fd);
/*
* NB: Once done is set, we can no longer touch sp!
* NB: Once done is set, we can no longer touch sp!
*/
for (done = 0; !done; ) {
assert(sp->wrk == w);
......
......@@ -119,7 +119,7 @@ vdi_random_getfd(const struct director *d, struct sess *sp)
}
/*
* If we are hashing, first try to hit our "canonical backend"
* If we are hashing, first try to hit our "canonical backend"
* If that fails, we fall through, and select a weighted backend
* amongst the healthy set.
*/
......
......@@ -151,7 +151,7 @@ RES_BuildHttp(struct sess *sp)
if(sp->http->protover >= 1.1)
http_PrintfHeader(sp->wrk, sp->fd, sp->wrk->resp,
"Transfer-Encoding: chunked");
else
else
sp->doclose = "ESI EOF";
}
......
......@@ -95,7 +95,7 @@ SES_Charge(struct sess *sp)
}
/*--------------------------------------------------------------------
* This function allocates a session + assorted peripheral data
* This function allocates a session + assorted peripheral data
* structures in one single malloc operation.
*/
......
......@@ -130,7 +130,7 @@ vca_main(void *arg)
v = poll(pollfd, hpoll + 1, 100);
assert(v >= 0);
if (v && pollfd[vca_pipes[0]].revents) {
if (pollfd[vca_pipes[0]].revents != POLLIN)
VSL(SLT_Debug, 0, "pipe.revents= 0x%x",
pollfd[vca_pipes[0]].revents);
......
......@@ -172,7 +172,7 @@ mcf_askchild(struct cli *cli, const char * const *av, void *priv)
"(child not running).\n"
"Type 'help' for more info.");
return;
}
}
AN(cli->cmd);
i = write(cli_o, cli->cmd, strlen(cli->cmd));
if (i != strlen(cli->cmd)) {
......@@ -186,7 +186,7 @@ mcf_askchild(struct cli *cli, const char * const *av, void *priv)
cli_out(cli, "CLI communication error");
return;
}
assert(i == 1 || errno == EPIPE);
(void)cli_readres(cli_i,
&u, &q, params->cli_timeout);
......@@ -418,7 +418,7 @@ mgt_cli_setup(int fdi, int fdo, int verbose, const char *ident, mgt_cli_close_f
(void)ident;
(void)verbose;
if (cls == NULL)
if (cls == NULL)
mgt_cli_init_cls();
cli = CLS_AddFd(cls, fdi, fdo, closefunc, priv);
......@@ -654,7 +654,7 @@ Marg_poker(const struct vev *e, int what)
M_conn = vev_new();
AN(M_conn);
M_conn->callback = Marg_poker;
M_conn->name = "-M connector";
M_conn->name = "-M connector";
M_conn->fd_flags = EV_WR;
M_conn->fd = s;
M_fd = s;
......@@ -682,6 +682,6 @@ mgt_cli_master(const char *M_arg)
AN(M_poker);
M_poker->timeout = M_poll;
M_poker->callback = Marg_poker;
M_poker->name = "-M poker";
M_poker->name = "-M poker";
AZ(vev_add(mgt_evb, M_poker));
}
......@@ -1056,7 +1056,7 @@ MCF_DumpMdoc(void)
}
printf(".Pp\n");
for (p = pp->descr; *p; p++) {
if (*p == '\n' && p[1] =='\0')
if (*p == '\n' && p[1] =='\0')
break;
if (*p == '\n' && p[1] =='\n') {
printf("\n.Pp\n");
......
......@@ -65,7 +65,7 @@ struct stevedore {
VTAILQ_ENTRY(stevedore) list;
};
struct object *STV_NewObject(struct sess *sp, unsigned len, double ttl,
struct object *STV_NewObject(struct sess *sp, unsigned len, double ttl,
unsigned nhttp);
struct storage *STV_alloc(struct sess *sp, size_t size, struct objcore *oc);
void STV_trim(struct storage *st, size_t size);
......
......@@ -278,10 +278,10 @@ cmd_server(CMD_ARGS)
continue;
}
/*
* We do an implict -wait if people muck about with a
* We do an implict -wait if people muck about with a
* running server.
*/
if (s->run)
if (s->run)
server_wait(s);
assert(s->run == 0);
......
......@@ -309,10 +309,10 @@ varnish_launch(struct varnish *v)
vtc_log(v->vl, 0, "FAIL no CLI connection accepted");
return;
}
AZ(close(v->cli_fd));
v->cli_fd = nfd;
vtc_log(v->vl, 3, "CLI connection fd = %d", v->cli_fd);
assert(v->cli_fd >= 0);
......@@ -345,20 +345,20 @@ varnish_start(struct varnish *v)
u = varnish_ask_cli(v, "start", &resp);
if (vtc_error)
return;
if (u != CLIS_OK)
if (u != CLIS_OK)
vtc_log(v->vl, 0, "CLI start command failed: %u %s", u, resp);
free(resp);
u = varnish_ask_cli(v, "debug.xid 1000", &resp);
if (vtc_error)
return;
if (u != CLIS_OK)
if (u != CLIS_OK)
vtc_log(v->vl, 0, "CLI debug.xid command failed: %u %s",
u, resp);
free(resp);
u = varnish_ask_cli(v, "debug.listen_address", &resp);
if (vtc_error)
return;
if (u != CLIS_OK)
if (u != CLIS_OK)
vtc_log(v->vl, 0,
"CLI debug.listen_address command failed: %u %s", u, resp);
h = resp;
......
......@@ -50,7 +50,7 @@ SVNID("$Id: cli.c 4235 2009-09-11 13:06:15Z phk $")
#include <cli_serve.h>
#include <libvarnish.h>
#include <miniobj.h>
struct cls_func {
unsigned magic;
#define CLS_FUNC_MAGIC 0x7d280c9b
......@@ -81,7 +81,7 @@ struct cls {
};
/*--------------------------------------------------------------------*/
void
CLS_func_close(struct cli *cli, const char *const *av, void *priv)
{
......@@ -262,7 +262,7 @@ cls_vlu(void *priv, const char *p)
av = ParseArgv(p, 0);
AN(av);
cli->result = CLIS_UNKNOWN;
cli->result = CLIS_UNKNOWN;
vsb_clear(cli->sb);
cli_out(cli, "Unknown request.\nType 'help' for more info.\n");
......@@ -355,7 +355,7 @@ CLS_AddFd(struct cls *cs, int fdi, int fdo, cls_cb_f *closefunc, void *priv)
static void
cls_close_fd(struct cls *cs, struct cls_fd *cfd)
{
CHECK_OBJ_NOTNULL(cs, CLS_MAGIC);
CHECK_OBJ_NOTNULL(cfd, CLS_FD_MAGIC);
......@@ -482,7 +482,7 @@ CLS_Destroy(struct cls **csp)
cs = *csp;
*csp = NULL;
CHECK_OBJ_NOTNULL(cs, CLS_MAGIC);
VTAILQ_FOREACH_SAFE(cfd, &cs->fds, list, cfd2)
VTAILQ_FOREACH_SAFE(cfd, &cs->fds, list, cfd2)
cls_close_fd(cs, cfd);
while (!VTAILQ_EMPTY(&cs->funcs)) {
......
......@@ -250,7 +250,7 @@ tst_delta()
exit (2);
}
}
int
main(int argc, char **argv)
{
......
......@@ -249,7 +249,7 @@ VSS_connect(const struct vss_addr *va, int nonblock)
perror("socket()");
return (-1);
}
if (nonblock)
if (nonblock)
TCP_nonblocking(sd);
i = connect(sd, &va->va_addr.sa, va->va_addrlen);
if (i == 0 || (nonblock && errno == EINPROGRESS))
......
......@@ -81,8 +81,8 @@ struct VSL_data {
* These two bitmaps mark fd's as belonging to client or backend
* transactions respectively.
*/
struct vbitmap *vbm_client;
struct vbitmap *vbm_backend;
struct vbitmap *vbm_client;
struct vbitmap *vbm_backend;
/*
* Bit map of programatically selected tags, that cannot be suppressed.
......
......@@ -190,7 +190,7 @@ Emit_Sockaddr(struct tokenlist *tl, const struct token *t_host,
*/
static void
vcc_EmitBeIdent(const struct tokenlist *tl, struct vsb *v,
vcc_EmitBeIdent(const struct tokenlist *tl, struct vsb *v,
int serial, const struct token *first, const struct token *last)
{
......@@ -833,7 +833,7 @@ vcc_ParseDirector(struct tokenlist *tl)
Fi(tl, 0, "\t VGC_backend__%.*s, &vgc_dir_priv_%.*s);\n",
PF(tl->t_dir), PF(tl->t_dir));
}
if (tl->err) {
vsb_printf(tl->sb,
......
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