[master] 28af712 Stylistic nitpickery while I wait for the construction noises to allow intelligent hacking again:
Poul-Henning Kamp
phk at varnish-cache.org
Fri Dec 16 10:43:10 CET 2011
commit 28af712ca43b363a8f6c0c813df67f8661dd2be9
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Fri Dec 16 09:42:19 2011 +0000
Stylistic nitpickery while I wait for the construction noises to
allow intelligent hacking again:
Wrap lines longer than 80 char and fix inconsistent copy&paste in
copyright/disclaimer text.
diff --git a/bin/varnishadm/varnishadm.c b/bin/varnishadm/varnishadm.c
index 4570e3c..bb5cc8e 100644
--- a/bin/varnishadm/varnishadm.c
+++ b/bin/varnishadm/varnishadm.c
@@ -14,7 +14,7 @@
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
- * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
@@ -224,7 +224,8 @@ pass(int sock)
if (fds[0].revents & POLLIN) {
/* Get rid of the prompt, kinda hackish */
u = write(1, "\r \r", 13);
- u = VCLI_ReadResult(fds[0].fd, &status, &answer, timeout);
+ u = VCLI_ReadResult(fds[0].fd, &status, &answer,
+ timeout);
if (u) {
if (status == CLIS_COMMS)
RL_EXIT(0);
diff --git a/bin/varnishd/cache/cache_acceptor.c b/bin/varnishd/cache/cache_acceptor.c
index 8c83121..661b053 100644
--- a/bin/varnishd/cache/cache_acceptor.c
+++ b/bin/varnishd/cache/cache_acceptor.c
@@ -123,7 +123,8 @@ VCA_Prep(struct sess *sp)
sp->addr = WS_Dup(sp->ws, addr);
sp->port = WS_Dup(sp->ws, port);
if (cache_param->log_local_addr) {
- AZ(getsockname(sp->fd, (void*)&sp->mysockaddr, &sp->mysockaddrlen));
+ AZ(getsockname(sp->fd, (void*)&sp->mysockaddr,
+ &sp->mysockaddrlen));
VTCP_name(&sp->mysockaddr, sp->mysockaddrlen,
addr, sizeof addr, port, sizeof port);
WSP(sp, SLT_SessionOpen, "%s %s %s %s",
diff --git a/bin/varnishd/cache/cache_backend.c b/bin/varnishd/cache/cache_backend.c
index c1bc055..6cfcaf3 100644
--- a/bin/varnishd/cache/cache_backend.c
+++ b/bin/varnishd/cache/cache_backend.c
@@ -354,7 +354,8 @@ vbe_GetVbe(const struct sess *sp, struct vdi_simple *vs)
return (vc);
}
VSC_C_main->backend_toolate++;
- WSL(sp->wrk, SLT_BackendClose, vc->vsl_id, "%s", bp->display_name);
+ WSL(sp->wrk, SLT_BackendClose, vc->vsl_id, "%s",
+ bp->display_name);
/* Checkpoint log to flush all info related to this connection
before the OS reuses the FD */
diff --git a/bin/varnishd/cache/cache_backend.h b/bin/varnishd/cache/cache_backend.h
index a3ae5c2..ad71169 100644
--- a/bin/varnishd/cache/cache_backend.h
+++ b/bin/varnishd/cache/cache_backend.h
@@ -175,7 +175,8 @@ void VBE_DropRefVcl(struct backend *);
void VBE_DropRefLocked(struct backend *b);
/* cache_backend_poll.c */
-void VBP_Insert(struct backend *b, struct vrt_backend_probe const *p, const char *hosthdr);
+void VBP_Insert(struct backend *b, struct vrt_backend_probe const *p,
+ const char *hosthdr);
void VBP_Remove(struct backend *b, struct vrt_backend_probe const *p);
void VBP_Use(const struct backend *b, const struct vrt_backend_probe const *p);
void VBP_Summary(struct cli *cli, const struct vbp_target *vt);
diff --git a/bin/varnishd/cache/cache_backend_poll.c b/bin/varnishd/cache/cache_backend_poll.c
index efd64cb..85ad69e 100644
--- a/bin/varnishd/cache/cache_backend_poll.c
+++ b/bin/varnishd/cache/cache_backend_poll.c
@@ -474,7 +474,8 @@ vbp_new_vcl(const struct vrt_backend_probe *p, const char *hosthdr)
*/
void
-VBP_Insert(struct backend *b, const struct vrt_backend_probe *p, const char *hosthdr)
+VBP_Insert(struct backend *b, const struct vrt_backend_probe *p,
+ const char *hosthdr)
{
struct vbp_target *vt;
struct vbp_vcl *vcl;
diff --git a/bin/varnishd/cache/cache_center.c b/bin/varnishd/cache/cache_center.c
index 8826ae2..aed15ee 100644
--- a/bin/varnishd/cache/cache_center.c
+++ b/bin/varnishd/cache/cache_center.c
@@ -237,7 +237,8 @@ cnt_prepresp(struct sess *sp)
sp->t_resp = W_TIM_real(wrk);
if (wrk->obj->objcore != NULL) {
- if ((sp->t_resp - wrk->obj->last_lru) > cache_param->lru_timeout &&
+ if ((sp->t_resp - wrk->obj->last_lru) >
+ cache_param->lru_timeout &&
EXP_Touch(wrk->obj->objcore))
wrk->obj->last_lru = sp->t_resp;
wrk->obj->last_use = sp->t_resp; /* XXX: locking ? */
@@ -1025,7 +1026,8 @@ cnt_first(struct sess *sp)
sp->ws_ses = WS_Snapshot(sp->ws);
/* Receive a HTTP protocol request */
- HTC_Init(sp->htc, sp->ws, sp->fd, sp->vsl_id, cache_param->http_req_size,
+ HTC_Init(sp->htc, sp->ws, sp->fd, sp->vsl_id,
+ cache_param->http_req_size,
cache_param->http_req_hdr_len);
wrk->acct_tmp.sess++;
@@ -1758,7 +1760,8 @@ static struct cli_proto debug_cmds[] = {
{ "debug.xid", "debug.xid",
"\tExamine or set XID\n", 0, 1, "d", cli_debug_xid },
{ "debug.srandom", "debug.srandom",
- "\tSeed the random(3) function\n", 0, 1, "d", cli_debug_srandom },
+ "\tSeed the random(3) function\n", 0, 1, "d",
+ cli_debug_srandom },
{ NULL }
};
diff --git a/bin/varnishd/cache/cache_esi_deliver.c b/bin/varnishd/cache/cache_esi_deliver.c
index 0d6b74c..e961819 100644
--- a/bin/varnishd/cache/cache_esi_deliver.c
+++ b/bin/varnishd/cache/cache_esi_deliver.c
@@ -313,7 +313,8 @@ ESI_Deliver(struct sess *sp)
* We have a gzip'ed VEC and delivers
* a gzip'ed ESI response.
*/
- (void)WRW_Write(sp->wrk, st->ptr + off, l2);
+ (void)WRW_Write(sp->wrk,
+ st->ptr + off, l2);
} else if (sp->wrk->gzip_resp) {
/*
* A gzip'ed ESI response, but the VEC
@@ -339,7 +340,8 @@ ESI_Deliver(struct sess *sp)
/*
* Ungzip'ed VEC, ungzip'ed ESI response
*/
- (void)WRW_Write(sp->wrk, st->ptr + off, l2);
+ (void)WRW_Write(sp->wrk,
+ st->ptr + off, l2);
}
off += l2;
if (off == st->len) {
diff --git a/bin/varnishd/cache/cache_pool.c b/bin/varnishd/cache/cache_pool.c
index a3cb805..afa069a 100644
--- a/bin/varnishd/cache/cache_pool.c
+++ b/bin/varnishd/cache/cache_pool.c
@@ -385,9 +385,9 @@ pool_breed(struct pool *qp, const pthread_attr_t *tp_attr)
* If we need more threads, and have space, create
* one more thread.
*/
- if (qp->nthr < cache_param->wthread_min || /* Not enough threads yet */
- (qp->lqueue > cache_param->wthread_add_threshold && /* more needed */
- qp->lqueue > qp->last_lqueue)) { /* not getting better since last */
+ if (qp->nthr < cache_param->wthread_min || /* Not enough threads yet */
+ (qp->lqueue > cache_param->wthread_add_threshold && /* need more */
+ qp->lqueue > qp->last_lqueue)) { /* not getting better since last */
if (qp->nthr > cache_param->wthread_max) {
Lck_Lock(&pool_mtx);
VSC_C_main->threads_limited++;
@@ -481,7 +481,8 @@ pool_herder(void *priv)
pp->nqueued = pp->ndropped = 0;
w = VTAILQ_LAST(&pp->idle, workerhead);
if (w != NULL &&
- (w->lastused < t_idle || pp->nthr > cache_param->wthread_max)) {
+ (w->lastused < t_idle ||
+ pp->nthr > cache_param->wthread_max)) {
VTAILQ_REMOVE(&pp->idle, w, list);
} else
w = NULL;
diff --git a/bin/varnishd/cache/cache_response.c b/bin/varnishd/cache/cache_response.c
index 7c63d51..43feae9 100644
--- a/bin/varnishd/cache/cache_response.c
+++ b/bin/varnishd/cache/cache_response.c
@@ -113,8 +113,8 @@ RES_BuildHttp(const struct sess *sp)
http_ClrHeader(sp->wrk->resp);
sp->wrk->resp->logtag = HTTP_Tx;
http_CopyResp(sp->wrk->resp, sp->wrk->obj->http);
- http_FilterFields(sp->wrk, sp->vsl_id, sp->wrk->resp, sp->wrk->obj->http,
- HTTPH_A_DELIVER);
+ http_FilterFields(sp->wrk, sp->vsl_id, sp->wrk->resp,
+ sp->wrk->obj->http, HTTPH_A_DELIVER);
if (!(sp->wrk->res_mode & RES_LEN)) {
http_Unset(sp->wrk->resp, H_Content_Length);
@@ -129,7 +129,8 @@ RES_BuildHttp(const struct sess *sp)
"Transfer-Encoding: chunked");
VTIM_format(VTIM_real(), time_str);
- http_PrintfHeader(sp->wrk, sp->vsl_id, sp->wrk->resp, "Date: %s", time_str);
+ http_PrintfHeader(sp->wrk, sp->vsl_id, sp->wrk->resp,
+ "Date: %s", time_str);
if (sp->xid != sp->wrk->obj->xid)
http_PrintfHeader(sp->wrk, sp->vsl_id, sp->wrk->resp,
diff --git a/bin/varnishd/cache/cache_vrt_var.c b/bin/varnishd/cache/cache_vrt_var.c
index 0662e26..54124b2 100644
--- a/bin/varnishd/cache/cache_vrt_var.c
+++ b/bin/varnishd/cache/cache_vrt_var.c
@@ -88,12 +88,12 @@ VRT_DO_HDR(req, proto, sp->http, HTTP_HDR_PROTO)
VRT_DO_HDR(bereq, request, sp->wrk->busyobj->bereq, HTTP_HDR_REQ)
VRT_DO_HDR(bereq, url, sp->wrk->busyobj->bereq, HTTP_HDR_URL)
VRT_DO_HDR(bereq, proto, sp->wrk->busyobj->bereq, HTTP_HDR_PROTO)
-VRT_DO_HDR(obj, proto, sp->wrk->obj->http, HTTP_HDR_PROTO)
-VRT_DO_HDR(obj, response, sp->wrk->obj->http, HTTP_HDR_RESPONSE)
+VRT_DO_HDR(obj, proto, sp->wrk->obj->http, HTTP_HDR_PROTO)
+VRT_DO_HDR(obj, response, sp->wrk->obj->http, HTTP_HDR_RESPONSE)
VRT_DO_HDR(resp, proto, sp->wrk->resp, HTTP_HDR_PROTO)
VRT_DO_HDR(resp, response, sp->wrk->resp, HTTP_HDR_RESPONSE)
VRT_DO_HDR(beresp, proto, sp->wrk->busyobj->beresp, HTTP_HDR_PROTO)
-VRT_DO_HDR(beresp, response, sp->wrk->busyobj->beresp, HTTP_HDR_RESPONSE)
+VRT_DO_HDR(beresp, response, sp->wrk->busyobj->beresp, HTTP_HDR_RESPONSE)
/*--------------------------------------------------------------------*/
diff --git a/bin/varnishd/cache/cache_ws.c b/bin/varnishd/cache/cache_ws.c
index 01937b3..b5f48d3 100644
--- a/bin/varnishd/cache/cache_ws.c
+++ b/bin/varnishd/cache/cache_ws.c
@@ -14,7 +14,7 @@
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
- * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
diff --git a/bin/varnishd/default.vcl b/bin/varnishd/default.vcl
index 412b6e9..dc4f555 100644
--- a/bin/varnishd/default.vcl
+++ b/bin/varnishd/default.vcl
@@ -16,15 +16,17 @@
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
- * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+
*
* The default VCL code.
*
diff --git a/bin/varnishd/hash/hash_critbit.c b/bin/varnishd/hash/hash_critbit.c
index 0b3a7b1..9935fc2 100644
--- a/bin/varnishd/hash/hash_critbit.c
+++ b/bin/varnishd/hash/hash_critbit.c
@@ -191,7 +191,8 @@ hcb_crit_bit(const struct objhead *oh1, const struct objhead *oh2,
*/
static struct objhead *
-hcb_insert(struct worker *wrk, struct hcb_root *root, struct objhead *oh, int has_lock)
+hcb_insert(struct worker *wrk, struct hcb_root *root, struct objhead *oh,
+ int has_lock)
{
volatile uintptr_t *p;
uintptr_t pp;
diff --git a/bin/varnishd/mgt/mgt.h b/bin/varnishd/mgt/mgt.h
index 52463e6..0e3eb9e 100644
--- a/bin/varnishd/mgt/mgt.h
+++ b/bin/varnishd/mgt/mgt.h
@@ -48,7 +48,8 @@ void MGT_Child_Cli_Fail(void);
/* mgt_cli.c */
typedef void mgt_cli_close_f(void *priv);
-void mgt_cli_setup(int fdi, int fdo, int verbose, const char *ident, mgt_cli_close_f *close_func, void *priv);
+void mgt_cli_setup(int fdi, int fdo, int verbose, const char *ident,
+ mgt_cli_close_f *close_func, void *priv);
int mgt_cli_askchild(unsigned *status, char **resp, const char *fmt, ...);
void mgt_cli_start_child(int fdi, int fdo);
void mgt_cli_stop_child(void);
diff --git a/bin/varnishd/mgt/mgt_cli.c b/bin/varnishd/mgt/mgt_cli.c
index b141f5b..cbea81f 100644
--- a/bin/varnishd/mgt/mgt_cli.c
+++ b/bin/varnishd/mgt/mgt_cli.c
@@ -374,7 +374,8 @@ mgt_cli_callback2(const struct vev *e, int what)
/*--------------------------------------------------------------------*/
void
-mgt_cli_setup(int fdi, int fdo, int verbose, const char *ident, mgt_cli_close_f *closefunc, void *priv)
+mgt_cli_setup(int fdi, int fdo, int verbose, const char *ident,
+ mgt_cli_close_f *closefunc, void *priv)
{
struct cli *cli;
struct vev *ev;
diff --git a/bin/varnishd/mgt/mgt_param.c b/bin/varnishd/mgt/mgt_param.c
index 1935344..128364c 100644
--- a/bin/varnishd/mgt/mgt_param.c
+++ b/bin/varnishd/mgt/mgt_param.c
@@ -797,7 +797,8 @@ static const struct parspec input_parspec[] = {
"See setsockopt(2) under SO_SNDTIMEO for more information.",
DELAYED_EFFECT,
"600", "seconds" },
- { "idle_send_timeout", tweak_timeout, &mgt_param.idle_send_timeout, 0, 0,
+ { "idle_send_timeout", tweak_timeout, &mgt_param.idle_send_timeout,
+ 0, 0,
"Time to wait with no data sent. "
"If no data has been transmitted in this many\n"
"seconds the session is closed. \n"
@@ -1409,7 +1410,8 @@ MCF_DumpRst(void)
const char *p, *q;
int i;
- printf("\n.. The following is the autogenerated output from varnishd -x dumprst\n\n");
+ printf("\n.. The following is the autogenerated "
+ "output from varnishd -x dumprst\n\n");
for (i = 0; i < nparspec; i++) {
pp = parspec[i];
printf("%s\n", pp->name);
diff --git a/bin/varnishd/mgt/mgt_pool.c b/bin/varnishd/mgt/mgt_pool.c
index e6320fd..d34eef2 100644
--- a/bin/varnishd/mgt/mgt_pool.c
+++ b/bin/varnishd/mgt/mgt_pool.c
@@ -135,7 +135,8 @@ const struct parspec WRK_parspec[] = {
"Minimum is 2 threads.",
EXPERIMENTAL | DELAYED_EFFECT,
"5", "threads" },
- { "thread_pool_timeout", tweak_timeout, &mgt_param.wthread_timeout, 1, 0,
+ { "thread_pool_timeout", tweak_timeout, &mgt_param.wthread_timeout,
+ 1, 0,
"Thread idle threshold.\n"
"\n"
"Threads in excess of thread_pool_min, which have been idle "
diff --git a/bin/varnishd/mgt/mgt_sandbox_solaris.c b/bin/varnishd/mgt/mgt_sandbox_solaris.c
index 114d6a4..e043fef 100644
--- a/bin/varnishd/mgt/mgt_sandbox_solaris.c
+++ b/bin/varnishd/mgt/mgt_sandbox_solaris.c
@@ -137,7 +137,8 @@ mgt_sandbox_solaris_init(void)
if (! (priv_all = priv_allocset())) {
REPORT(LOG_ERR,
- "Child start warning: mgt_sandbox_init - priv_allocset failed: errno=%d (%s)",
+ "Child start warning: "
+ " mgt_sandbox_init - priv_allocset failed: errno=%d (%s)",
errno, strerror(errno));
return;
}
@@ -164,7 +165,8 @@ mgt_sandbox_solaris_privsep(void)
if (getuid() != mgt_param.uid)
XXXAZ(setuid(mgt_param.uid));
} else {
- REPORT(LOG_INFO, "Privilege %s missing, will not change uid/gid",
+ REPORT(LOG_INFO,
+ "Privilege %s missing, will not change uid/gid",
PRIV_PROC_SETID);
}
}
@@ -194,7 +196,8 @@ mgt_sandbox_solaris_fini(void)
!(inheritable = priv_allocset()) ||
!(permitted = priv_allocset())) {
REPORT(LOG_ERR,
- "Child start warning: mgt_sandbox_waive - priv_allocset failed: errno=%d (%s)",
+ "Child start warning: "
+ " mgt_sandbox_waive - priv_allocset failed: errno=%d (%s)",
errno, strerror(errno));
return;
}
@@ -218,7 +221,8 @@ mgt_sandbox_solaris_fini(void)
#define SETPPRIV(which, set) \
if (setppriv(PRIV_OFF, which, set)) \
REPORT(LOG_ERR, \
- "Child start warning: Waiving privileges failed on %s: errno=%d (%s)", \
+ "Child start warning: " \
+ " Waiving privileges failed on %s: errno=%d (%s)", \
#which, errno, strerror(errno));
SETPPRIV(PRIV_LIMIT, permitted);
diff --git a/bin/varnishd/waiter/cache_waiter_kqueue.c b/bin/varnishd/waiter/cache_waiter_kqueue.c
index 23df3de..7ceb80c 100644
--- a/bin/varnishd/waiter/cache_waiter_kqueue.c
+++ b/bin/varnishd/waiter/cache_waiter_kqueue.c
@@ -131,7 +131,8 @@ vwk_kev(struct vwk *vwk, const struct kevent *kp)
SES_Delete(sp, "EOF");
return;
} else {
- VSL(SLT_Debug, sp->vsl_id, "KQ: sp %p kev data %lu flags 0x%x%s",
+ VSL(SLT_Debug, sp->vsl_id,
+ "KQ: sp %p kev data %lu flags 0x%x%s",
sp, (unsigned long)kp->data, kp->flags,
(kp->flags & EV_EOF) ? " EOF" : "");
}
diff --git a/bin/varnishd/waiter/cache_waiter_ports.c b/bin/varnishd/waiter/cache_waiter_ports.c
index 17d7ce0..ce2afc3 100644
--- a/bin/varnishd/waiter/cache_waiter_ports.c
+++ b/bin/varnishd/waiter/cache_waiter_ports.c
@@ -15,7 +15,7 @@
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
- * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
@@ -108,7 +108,8 @@ vws_port_ev(struct vws *vws, port_event_t *ev) {
* port_dissociate after port_getn(), but in fact,
* port_dissociate should be used
*
- * Ref: http://opensolaris.org/jive/thread.jspa?threadID=129476&tstart=0
+ * Ref: http://opensolaris.org/jive/thread.jspa?\
+ * threadID=129476&tstart=0
*/
vws_del(vws, sp->fd);
VTAILQ_REMOVE(&vws->sesshead, sp, list);
@@ -145,7 +146,7 @@ vws_thread(void *priv)
* - additional tolerance for handling session timeouts
*
*/
- static struct timespec min_ts = {0L, 100L /*ms*/ * 1000L /*us*/ * 1000L /*ns*/};
+ static struct timespec min_ts = {0L, 100L * 1000L * 1000L /*ns*/};
static double min_t = 0.1; /* 100 ms*/
static struct timespec max_ts = {1L, 0L}; /* 1 second */
static double max_t = 1.0; /* 1 second */
@@ -177,7 +178,8 @@ vws_thread(void *priv)
/*
* see disucssion in
* - https://issues.apache.org/bugzilla/show_bug.cgi?id=47645
- * - http://mail.opensolaris.org/pipermail/networking-discuss/2009-August/011979.html
+ * - http://mail.opensolaris.org/pipermail/\
+ * networking-discuss/2009-August/011979.html
*
* comment from apr/poll/unix/port.c :
*
@@ -224,9 +226,13 @@ vws_thread(void *priv)
*/
if (sp) {
- double tmo = (sp->t_open + cache_param->sess_timeout) - now;
+ double tmo =
+ (sp->t_open + cache_param->sess_timeout) - now;
- /* we should have removed all sps whose timeout has passed */
+ /*
+ * we should have removed all sps whose timeout
+ * has passed
+ */
assert(tmo > 0.0);
if (tmo < min_t) {
diff --git a/bin/varnishhist/varnishhist.c b/bin/varnishhist/varnishhist.c
index 852ff41..03bfd88 100644
--- a/bin/varnishhist/varnishhist.c
+++ b/bin/varnishhist/varnishhist.c
@@ -106,9 +106,21 @@ struct profile {
int hist_low;
int hist_high;
} profiles[] = {
- { .name = "responsetime", .tag = SLT_ReqEnd, .field = 5, .hist_low = -6, .hist_high = 3 },
- { .name = "size", .tag = SLT_Length, .field = 1, .hist_low = 1, .hist_high = 8 },
- { 0 }
+ {
+ .name = "responsetime",
+ .tag = SLT_ReqEnd,
+ .field = 5,
+ .hist_low = -6,
+ .hist_high = 3
+ }, {
+ .name = "size",
+ .tag = SLT_Length,
+ .field = 1,
+ .hist_low = 1,
+ .hist_high = 8
+ }, {
+ .name = 0,
+ }
};
static struct profile *active_profile;
@@ -335,7 +347,8 @@ static void
usage(void)
{
fprintf(stderr, "usage: varnishhist "
- "%s [-p profile] [-f field_num] [-R max] [-r min] [-V] [-w delay]\n", VSL_USAGE);
+ "%s [-p profile] [-f field_num] "
+ "[-R max] [-r min] [-V] [-w delay]\n", VSL_USAGE);
exit(1);
}
@@ -386,7 +399,8 @@ main(int argc, char **argv)
}
}
if (profile) {
- for (active_profile = profiles; active_profile->name; active_profile++) {
+ for (active_profile = profiles; active_profile->name;
+ active_profile++) {
if (strcmp(active_profile->name, profile) == 0) {
break;
}
diff --git a/bin/varnishlog/varnishlog.c b/bin/varnishlog/varnishlog.c
index 45b4327..a606861 100644
--- a/bin/varnishlog/varnishlog.c
+++ b/bin/varnishlog/varnishlog.c
@@ -270,7 +270,8 @@ static void
usage(void)
{
fprintf(stderr, "usage: varnishlog "
- "%s [-aDV] [-o [tag regex]] [-n varnish_name] [-P file] [-w file]\n", VSL_USAGE);
+ "%s [-aDV] [-o [tag regex]] [-n varnish_name]"
+ " [-P file] [-w file]\n", VSL_USAGE);
exit(1);
}
diff --git a/bin/varnishncsa/varnishncsa.c b/bin/varnishncsa/varnishncsa.c
index 5561adc..9da6172 100644
--- a/bin/varnishncsa/varnishncsa.c
+++ b/bin/varnishncsa/varnishncsa.c
@@ -102,7 +102,8 @@ static struct logline {
char *df_u; /* %u, Remote user */
char *df_ttfb; /* Time to first byte */
const char *df_hitmiss; /* Whether this is a hit or miss */
- const char *df_handling; /* How the request was handled (hit/miss/pass/pipe) */
+ const char *df_handling; /* How the request was handled
+ (hit/miss/pass/pipe) */
int active; /* Is log line in an active trans */
int complete; /* Is log line complete */
uint64_t bitmap; /* Bitmap for regex matches */
@@ -549,7 +550,9 @@ collect_client(struct logline *lp, enum VSL_tag_e tag, unsigned spec,
char ttfb[64];
if (!lp->active)
break;
- if (lp->df_ttfb != NULL || sscanf(ptr, "%*u %*u.%*u %ld.%*u %*u.%*u %s", &l, ttfb) != 2) {
+ if (lp->df_ttfb != NULL ||
+ sscanf(ptr, "%*u %*u.%*u %ld.%*u %*u.%*u %s", &l, ttfb)
+ != 2) {
clean_logline(lp);
break;
}
@@ -679,7 +682,8 @@ h_ncsa(void *priv, enum VSL_tag_e tag, unsigned fd,
VSB_cat(os, lp->df_m ? lp->df_m : "-");
VSB_putc(os, ' ');
if (req_header(lp, "Host")) {
- if (strncmp(req_header(lp, "Host"), "http://", 7) != 0)
+ if (strncmp(req_header(lp, "Host"),
+ "http://", 7) != 0)
VSB_cat(os, "http://");
VSB_cat(os, req_header(lp, "Host"));
} else {
@@ -698,7 +702,8 @@ h_ncsa(void *priv, enum VSL_tag_e tag, unsigned fd,
case 't':
/* %t */
- strftime(tbuf, sizeof tbuf, "[%d/%b/%Y:%T %z]", &lp->df_t);
+ strftime(tbuf, sizeof tbuf,
+ "[%d/%b/%Y:%T %z]", &lp->df_t);
VSB_cat(os, tbuf);
break;
@@ -753,20 +758,23 @@ h_ncsa(void *priv, enum VSL_tag_e tag, unsigned fd,
p = tmp;
break;
case 'x':
- if (strcmp(fname, "Varnish:time_firstbyte") == 0) {
+ if (!strcmp(fname, "Varnish:time_firstbyte")) {
VSB_cat(os, lp->df_ttfb);
p = tmp;
break;
- } else if (strcmp(fname, "Varnish:hitmiss") == 0) {
- VSB_cat(os, (lp->df_hitmiss ? lp->df_hitmiss : "-"));
+ } else if (!strcmp(fname, "Varnish:hitmiss")) {
+ VSB_cat(os, (lp->df_hitmiss ?
+ lp->df_hitmiss : "-"));
p = tmp;
break;
- } else if (strcmp(fname, "Varnish:handling") == 0) {
- VSB_cat(os, (lp->df_handling ? lp->df_handling : "-"));
+ } else if (!strcmp(fname, "Varnish:handling")) {
+ VSB_cat(os, (lp->df_handling ?
+ lp->df_handling : "-"));
p = tmp;
break;
- } else if (strncmp(fname, "VCL_Log:", 8) == 0) {
- // support pulling entries logged with std.log() into output.
+ } else if (!strncmp(fname, "VCL_Log:", 8)) {
+ // support pulling entries logged
+ // with std.log() into output.
// Format: %{VCL_Log:keyname}x
// Logging: std.log("keyname:value")
h = vcl_log(lp, fname+8);
@@ -775,7 +783,8 @@ h_ncsa(void *priv, enum VSL_tag_e tag, unsigned fd,
break;
}
default:
- fprintf(stderr, "Unknown format starting at: %s\n", --p);
+ fprintf(stderr,
+ "Unknown format starting at: %s\n", --p);
exit(1);
}
break;
@@ -783,7 +792,8 @@ h_ncsa(void *priv, enum VSL_tag_e tag, unsigned fd,
/* Fall through if we haven't handled something */
/* FALLTHROUGH*/
default:
- fprintf(stderr, "Unknown format starting at: %s\n", --p);
+ fprintf(stderr,
+ "Unknown format starting at: %s\n", --p);
exit(1);
}
}
@@ -854,15 +864,18 @@ main(int argc, char *argv[])
break;
case 'f':
if (format_flag) {
- fprintf(stderr, "-f and -F can not be combined\n");
+ fprintf(stderr,
+ "-f and -F can not be combined\n");
exit(1);
}
- format = "%{X-Forwarded-For}i %l %u %t \"%r\" %s %b \"%{Referer}i\" \"%{User-agent}i\"";
+ format = "%{X-Forwarded-For}i %l %u %t \"%r\""
+ " %s %b \"%{Referer}i\" \"%{User-agent}i\"";
format_flag = 1;
break;
case 'F':
if (format_flag) {
- fprintf(stderr, "-f and -F can not be combined\n");
+ fprintf(stderr,
+ "-f and -F can not be combined\n");
exit(1);
}
format_flag = 1;
diff --git a/bin/varnishstat/varnishstat.c b/bin/varnishstat/varnishstat.c
index 5d9226f..859c379 100644
--- a/bin/varnishstat/varnishstat.c
+++ b/bin/varnishstat/varnishstat.c
@@ -241,7 +241,9 @@ usage(void)
"The varnishd instance to get logs from");
fprintf(stderr, FMT, "-V", "Display the version number and exit");
fprintf(stderr, FMT, "-w delay",
- "Wait delay seconds between updates. Default is 1 second. Can also be be used with -1, -x or -j for repeated output.");
+ "Wait delay seconds between updates."
+ " Default is 1 second."
+ " Can also be be used with -1, -x or -j for repeated output.");
fprintf(stderr, FMT, "-x",
"Print statistics to stdout as XML.");
fprintf(stderr, FMT, "-j",
diff --git a/bin/varnishstat/varnishstat.h b/bin/varnishstat/varnishstat.h
index 0a5d80f..c229ed2 100644
--- a/bin/varnishstat/varnishstat.h
+++ b/bin/varnishstat/varnishstat.h
@@ -36,4 +36,5 @@
#include "vcs.h"
-void do_curses(struct VSM_data *vd, const struct VSC_C_main *VSC_C_main, int delay);
+void do_curses(struct VSM_data *vd, const struct VSC_C_main *VSC_C_main,
+ int delay);
diff --git a/bin/varnishstat/varnishstat.xsd b/bin/varnishstat/varnishstat.xsd
index 84b0a6a..e9c5f3c 100644
--- a/bin/varnishstat/varnishstat.xsd
+++ b/bin/varnishstat/varnishstat.xsd
@@ -1,19 +1,19 @@
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
- <xs:element name="varnishstat">
- <xs:complexType>
+ <xs:element name="varnishstat">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="stat" maxOccurs="unbounded">
+ <xs:complexType>
<xs:sequence>
- <xs:element name="stat" maxOccurs="unbounded">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="name" type="xs:string"/>
- <xs:element name="value" type="xs:integer"/>
- <xs:element name="description" type="xs:string"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
+ <xs:element name="name" type="xs:string"/>
+ <xs:element name="value" type="xs:integer"/>
+ <xs:element name="description" type="xs:string"/>
</xs:sequence>
- <xs:attribute name="timestamp" type="xs:dateTime"/>
- </xs:complexType>
- </xs:element>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ <xs:attribute name="timestamp" type="xs:dateTime"/>
+ </xs:complexType>
+ </xs:element>
</xs:schema>
diff --git a/bin/varnishstat/varnishstat_curses.c b/bin/varnishstat/varnishstat_curses.c
index d4e714c..3a672e1 100644
--- a/bin/varnishstat/varnishstat_curses.c
+++ b/bin/varnishstat/varnishstat_curses.c
@@ -174,7 +174,8 @@ do_curses(struct VSM_data *vd, const struct VSC_C_main *VSC_C_main,
* Break to outher loop if we need to re-read file.
* Only check if it looks like nothing is happening.
*/
- act = VSC_C_main->cache_hit + VSC_C_main->cache_miss + 1;
+ act = VSC_C_main->cache_hit +
+ VSC_C_main->cache_miss + 1;
lact = act;
AZ(gettimeofday(&tv, NULL));
diff --git a/bin/varnishtest/vtc_log.c b/bin/varnishtest/vtc_log.c
index 890a98b..402b49f 100644
--- a/bin/varnishtest/vtc_log.c
+++ b/bin/varnishtest/vtc_log.c
@@ -229,7 +229,8 @@ vtc_dump(struct vtclog *vl, int lvl, const char *pfx, const char *str, int len)
//lint -e{818}
void
-vtc_hexdump(struct vtclog *vl, int lvl, const char *pfx, const unsigned char *str, int len)
+vtc_hexdump(struct vtclog *vl, int lvl, const char *pfx,
+ const unsigned char *str, int len)
{
int nl = 1;
unsigned l;
diff --git a/bin/varnishtop/varnishtop.c b/bin/varnishtop/varnishtop.c
index 62efb15..716b35b 100644
--- a/bin/varnishtop/varnishtop.c
+++ b/bin/varnishtop/varnishtop.c
@@ -327,7 +327,8 @@ main(int argc, char **argv)
errno = 0;
period = strtol(optarg, NULL, 0);
if (errno != 0) {
- fprintf(stderr, "Syntax error, %s is not a number", optarg);
+ fprintf(stderr,
+ "Syntax error, %s is not a number", optarg);
exit(1);
}
break;
diff --git a/include/tbl/vsc_f_main.h b/include/tbl/vsc_f_main.h
index c8c4ecb..d63b187 100644
--- a/include/tbl/vsc_f_main.h
+++ b/include/tbl/vsc_f_main.h
@@ -20,7 +20,7 @@
* ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION, "")
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
@@ -136,7 +136,8 @@ VSC_F(fetch_chunked, uint64_t, 1, 'a', "Fetch chunked", "")
VSC_F(fetch_eof, uint64_t, 1, 'a', "Fetch EOF", "")
VSC_F(fetch_bad, uint64_t, 1, 'a', "Fetch had bad headers", "")
VSC_F(fetch_close, uint64_t, 1, 'a', "Fetch wanted close", "")
-VSC_F(fetch_oldhttp, uint64_t, 1, 'a', "Fetch pre HTTP/1.1 closed", "")
+VSC_F(fetch_oldhttp, uint64_t, 1, 'a',
+ "Fetch pre HTTP/1.1 closed", "")
VSC_F(fetch_zero, uint64_t, 1, 'a', "Fetch zero len", "")
VSC_F(fetch_failed, uint64_t, 1, 'a', "Fetch failed", "")
VSC_F(fetch_1xx, uint64_t, 1, 'a', "Fetch no body (1xx)", "")
@@ -293,9 +294,11 @@ VSC_F(sess_herd, uint64_t, 1, 'a', "Session herd", "")
VSC_F(shm_records, uint64_t, 0, 'a', "SHM records", "")
VSC_F(shm_writes, uint64_t, 0, 'a', "SHM writes", "")
-VSC_F(shm_flushes, uint64_t, 0, 'a', "SHM flushes due to overflow", "")
+VSC_F(shm_flushes, uint64_t, 0, 'a',
+ "SHM flushes due to overflow", "")
VSC_F(shm_cont, uint64_t, 0, 'a', "SHM MTX contention", "")
-VSC_F(shm_cycles, uint64_t, 0, 'a', "SHM cycles through buffer", "")
+VSC_F(shm_cycles, uint64_t, 0, 'a',
+ "SHM cycles through buffer", "")
VSC_F(sms_nreq, uint64_t, 0, 'a', "SMS allocator requests", "")
VSC_F(sms_nobj, uint64_t, 0, 'i', "SMS outstanding allocations", "")
@@ -353,19 +356,24 @@ VSC_F(bans_dups, uint64_t, 0, 'c',
/**********************************************************************/
-VSC_F(hcb_nolock, uint64_t, 0, 'a', "HCB Lookups without lock", "")
+VSC_F(hcb_nolock, uint64_t, 0, 'a',
+ "HCB Lookups without lock", "")
VSC_F(hcb_lock, uint64_t, 0, 'a', "HCB Lookups with lock", "")
VSC_F(hcb_insert, uint64_t, 0, 'a', "HCB Inserts", "")
-VSC_F(esi_errors, uint64_t, 0, 'a', "ESI parse errors (unlock)", "")
-VSC_F(esi_warnings, uint64_t, 0, 'a', "ESI parse warnings (unlock)", "")
+VSC_F(esi_errors, uint64_t, 0, 'a',
+ "ESI parse errors (unlock)", "")
+VSC_F(esi_warnings, uint64_t, 0, 'a',
+ "ESI parse warnings (unlock)", "")
VSC_F(client_drop_late, uint64_t, 0, 'a', "Connection dropped late", "")
VSC_F(uptime, uint64_t, 0, 'a', "Client uptime", "")
VSC_F(dir_dns_lookups, uint64_t, 0, 'a', "DNS director lookups", "")
VSC_F(dir_dns_failed, uint64_t, 0, 'a', "DNS director failed lookups", "")
-VSC_F(dir_dns_hit, uint64_t, 0, 'a', "DNS director cached lookups hit", "")
-VSC_F(dir_dns_cache_full, uint64_t, 0, 'a', "DNS director full dnscache", "")
+VSC_F(dir_dns_hit, uint64_t, 0, 'a',
+ "DNS director cached lookups hit", "")
+VSC_F(dir_dns_cache_full, uint64_t, 0, 'a',
+ "DNS director full dnscache", "")
VSC_F(vmods, uint64_t, 0, 'i', "Loaded VMODs", "")
diff --git a/include/tbl/vsc_fields.h b/include/tbl/vsc_fields.h
index 58f4d88..2671558 100644
--- a/include/tbl/vsc_fields.h
+++ b/include/tbl/vsc_fields.h
@@ -20,7 +20,7 @@
* ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION, "")
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
diff --git a/include/vlu.h b/include/vlu.h
index e69c6ae..a9fe074 100644
--- a/include/vlu.h
+++ b/include/vlu.h
@@ -11,7 +11,7 @@
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
- * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
diff --git a/include/vtcp.h b/include/vtcp.h
index 6ad260e..77f86ed 100644
--- a/include/vtcp.h
+++ b/include/vtcp.h
@@ -54,8 +54,10 @@ VTCP_Check(int a)
#define VTCP_Assert(a) assert(VTCP_Check(a))
-void VTCP_myname(int sock, char *abuf, unsigned alen, char *pbuf, unsigned plen);
-void VTCP_hisname(int sock, char *abuf, unsigned alen, char *pbuf, unsigned plen);
+void VTCP_myname(int sock, char *abuf, unsigned alen,
+ char *pbuf, unsigned plen);
+void VTCP_hisname(int sock, char *abuf, unsigned alen,
+ char *pbuf, unsigned plen);
int VTCP_filter_http(int sock);
int VTCP_blocking(int sock);
int VTCP_nonblocking(int sock);
diff --git a/lib/libvarnish/vct.c b/lib/libvarnish/vct.c
index f0e1635..c82e972 100644
--- a/lib/libvarnish/vct.c
+++ b/lib/libvarnish/vct.c
@@ -13,10 +13,10 @@
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
- * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
+ * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
diff --git a/lib/libvarnish/vfil.c b/lib/libvarnish/vfil.c
index ca1d965..6bcbde5 100644
--- a/lib/libvarnish/vfil.c
+++ b/lib/libvarnish/vfil.c
@@ -110,7 +110,8 @@ VFIL_readfile(const char *pfx, const char *fn, ssize_t *sz)
if (fn[0] == '/')
fd = open(fn, O_RDONLY);
else if (pfx != NULL) {
- bprintf(fnb, "/%s/%s", pfx, fn); /* XXX: graceful length check */
+ bprintf(fnb, "/%s/%s", pfx, fn);
+ /* XXX: graceful length check */
fd = open(fnb, O_RDONLY);
} else
fd = open(fn, O_RDONLY);
diff --git a/lib/libvarnish/vlu.c b/lib/libvarnish/vlu.c
index f149a57..610ca8b 100644
--- a/lib/libvarnish/vlu.c
+++ b/lib/libvarnish/vlu.c
@@ -11,10 +11,10 @@
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
- * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
+ * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
diff --git a/lib/libvarnish/vtcp.c b/lib/libvarnish/vtcp.c
index d15f516..e361738 100644
--- a/lib/libvarnish/vtcp.c
+++ b/lib/libvarnish/vtcp.c
@@ -199,7 +199,8 @@ VTCP_nonblocking(int sock)
*/
int
-VTCP_connect(int s, const struct sockaddr_storage *name, socklen_t namelen, int msec)
+VTCP_connect(int s, const struct sockaddr_storage *name, socklen_t namelen,
+ int msec)
{
int i, k;
socklen_t l;
@@ -271,7 +272,8 @@ VTCP_set_read_timeout(int s, double seconds)
* timeout does not get set. Needs to be fixed in Solaris, there is
* nothing we can do about this.
*/
- VTCP_Assert(setsockopt(s, SOL_SOCKET, SO_RCVTIMEO, &timeout, sizeof timeout));
+ VTCP_Assert(setsockopt(s, SOL_SOCKET, SO_RCVTIMEO,
+ &timeout, sizeof timeout));
#else
(void)s;
#endif
diff --git a/lib/libvarnishapi/vsc.c b/lib/libvarnishapi/vsc.c
index b399c98..accef82 100644
--- a/lib/libvarnishapi/vsc.c
+++ b/lib/libvarnishapi/vsc.c
@@ -379,9 +379,8 @@ VSC_Iter(struct VSM_data *vd, VSC_iter_f *func, void *priv)
VSM_Close(vd);
if (!vd->head && VSM_Open(vd))
return (-1);
- if (!VSM_Get(vd, &vsc->iter_fantom, VSC_CLASS, "", "")) {
+ if (!VSM_Get(vd, &vsc->iter_fantom, VSC_CLASS, "", ""))
return (-1);
- }
}
AN(vd->head);
/* Tell app that list will be nuked */
diff --git a/lib/libvcl/Makefile.am b/lib/libvcl/Makefile.am
index 44e2957..f135e43 100644
--- a/lib/libvcl/Makefile.am
+++ b/lib/libvcl/Makefile.am
@@ -33,8 +33,9 @@ libvcl_la_SOURCES = \
EXTRA_DIST = \
generate.py
-vcc_obj.c vcc_fixed_token.c vcc_token_defs.h: $(srcdir)/generate.py $(top_srcdir)/include/vrt.h
- @PYTHON@ $(top_srcdir)/lib/libvcl/generate.py $(top_srcdir) $(top_builddir)
+vcc_obj.c vcc_fixed_token.c vcc_token_defs.h: \
+ $(srcdir)/generate.py $(top_srcdir)/include/vrt.h
+ @PYTHON@ $(srcdir)/generate.py $(srcdir) $(top_builddir)
CLEANFILES = $(builddir)/vcc_token_defs.h \
$(builddir)/vcc_fixed_token.c \
diff --git a/lib/libvcl/vcc_compile.h b/lib/libvcl/vcc_compile.h
index b67e4ca..caacd73 100644
--- a/lib/libvcl/vcc_compile.h
+++ b/lib/libvcl/vcc_compile.h
@@ -103,7 +103,8 @@ enum symkind {
#undef VCC_SYMB
};
-typedef void sym_expr_t(struct vcc *tl, struct expr **, const struct symbol *sym);
+typedef void sym_expr_t(struct vcc *tl, struct expr **,
+ const struct symbol *sym);
typedef struct symbol *sym_wildcard_t(struct vcc *tl, const struct token *t,
const struct symbol *sym);
@@ -234,7 +235,8 @@ void vcc_ResetFldSpec(struct fld_spec *f);
void vcc_IsField(struct vcc *tl, struct token **t, struct fld_spec *fs);
void vcc_FieldsOk(struct vcc *tl, const struct fld_spec *fs);
-void Emit_Sockaddr(struct vcc *tl, const struct token *t_host, const char *port);
+void Emit_Sockaddr(struct vcc *tl, const struct token *t_host,
+ const char *port);
/* vcc_compile.c */
extern struct method method_tab[];
@@ -292,7 +294,8 @@ char *vcc_regexp(struct vcc *tl);
/* vcc_symb.c */
struct symbol *VCC_AddSymbolStr(struct vcc *tl, const char *name, enum symkind);
-struct symbol *VCC_AddSymbolTok(struct vcc *tl, const struct token *t, enum symkind kind);
+struct symbol *VCC_AddSymbolTok(struct vcc *tl, const struct token *t,
+ enum symkind kind);
struct symbol *VCC_GetSymbolTok(struct vcc *tl, const struct token *tok,
enum symkind);
struct symbol *VCC_FindSymbol(struct vcc *tl,
diff --git a/lib/libvcl/vcc_vmod.c b/lib/libvcl/vcc_vmod.c
index 55b43d7..bd9f366 100644
--- a/lib/libvcl/vcc_vmod.c
+++ b/lib/libvcl/vcc_vmod.c
@@ -163,7 +163,8 @@ vcc_ParseImport(struct vcc *tl)
p = *spec;
if (!strcmp(p, "INIT")) {
p += strlen(p) + 1;
- Fi(tl, 0, "\t%s(&vmod_priv_%.*s, &VCL_conf);\n", p, PF(mod));
+ Fi(tl, 0, "\t%s(&vmod_priv_%.*s, &VCL_conf);\n",
+ p, PF(mod));
} else {
sym = VCC_AddSymbolStr(tl, p, SYM_FUNC);
ERRCHK(tl);
diff --git a/lib/libvmod_std/Makefile.am b/lib/libvmod_std/Makefile.am
index 065948a..c4128ea 100644
--- a/lib/libvmod_std/Makefile.am
+++ b/lib/libvmod_std/Makefile.am
@@ -8,6 +8,7 @@ INCLUDES = \
dist_man_MANS = vmod_std.3
vmoddir = $(pkglibdir)/vmods
+vmod_srcdir = $(top_srcdir)/lib/libvmod_std
vmod_LTLIBRARIES = libvmod_std.la
libvmod_std_la_LDFLAGS = -module -export-dynamic -avoid-version
@@ -19,8 +20,8 @@ libvmod_std_la_SOURCES = \
vmod_std_fileread.c \
vmod_std_conversions.c
-vcc_if.c vcc_if.h: $(top_srcdir)/lib/libvmod_std/vmod.py $(top_srcdir)/lib/libvmod_std/vmod.vcc
- @PYTHON@ $(top_srcdir)/lib/libvmod_std/vmod.py $(top_srcdir)/lib/libvmod_std/vmod.vcc
+vcc_if.c vcc_if.h: $(vmod_srcdir)/vmod.py $(vmod_srcdir)/vmod.vcc
+ @PYTHON@ $(vmod_srcdir)/vmod.py $(vmod_srcdir)/vmod.vcc
EXTRA_DIST = vmod.py vmod.vcc
diff --git a/lib/libvmod_std/vmod.py b/lib/libvmod_std/vmod.py
index 6a9b4fc..e409628 100755
--- a/lib/libvmod_std/vmod.py
+++ b/lib/libvmod_std/vmod.py
@@ -223,12 +223,14 @@ while True:
if at == "ENUM":
if tq == None:
raise Exception(
- "Argument type '%s' needs qualifier {...}" % at)
+ "Argument type '%s' needs qualifier {...}"
+ % at)
at=parse_enum(tq)
elif tq != None:
raise Exception(
- "Argument type '%s' cannot be qualified with {...}" % at)
+ "Argument type '%s' cannot be qualified with {...}"
+ % at)
vargs.append(at)
@@ -246,7 +248,8 @@ def dumps(s):
#######################################################################
if initname != "":
- plist += "int " + initname + "(struct vmod_priv *, const struct VCL_conf *);\n"
+ plist += "int " + initname
+ plist += "(struct vmod_priv *, const struct VCL_conf *);\n"
pstruct += "\tvmod_init_f\t*_init;\n"
pinit += "\t" + initname + ",\n"
slist += '\t"INIT\\0Vmod_Func_' + modname + '._init",\n'
diff --git a/lib/libvmod_std/vmod_std_fileread.c b/lib/libvmod_std/vmod_std_fileread.c
index 89e4f50..154d8ca 100644
--- a/lib/libvmod_std/vmod_std_fileread.c
+++ b/lib/libvmod_std/vmod_std_fileread.c
@@ -59,8 +59,8 @@ struct frfile {
VTAILQ_ENTRY(frfile) list;
};
-static VTAILQ_HEAD(, frfile) frlist = VTAILQ_HEAD_INITIALIZER(frlist);
-static pthread_mutex_t frmtx = PTHREAD_MUTEX_INITIALIZER;
+static VTAILQ_HEAD(, frfile) frlist = VTAILQ_HEAD_INITIALIZER(frlist);
+static pthread_mutex_t frmtx = PTHREAD_MUTEX_INITIALIZER;
static void
free_frfile(void *ptr)
More information about the varnish-commit
mailing list