[experimental-ims] 0fe28b3 Polish whitespace and update copyrights.

Geoff Simmons geoff at varnish-cache.org
Mon Jan 9 21:52:30 CET 2012


commit 0fe28b30be96ca4232b6d037598202ba1272290e
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Wed Nov 9 09:47:15 2011 +0000

    Polish whitespace and update copyrights.

diff --git a/bin/varnishd/cache_backend.h b/bin/varnishd/cache_backend.h
index 91bff1e..72a1283 100644
--- a/bin/varnishd/cache_backend.h
+++ b/bin/varnishd/cache_backend.h
@@ -1,6 +1,6 @@
 /*-
  * Copyright (c) 2006 Verdens Gang AS
- * Copyright (c) 2006-2010 Varnish Software AS
+ * Copyright (c) 2006-2011 Varnish Software AS
  * All rights reserved.
  *
  * Author: Poul-Henning Kamp <phk at phk.freebsd.dk>
diff --git a/bin/varnishd/cache_backend_cfg.c b/bin/varnishd/cache_backend_cfg.c
index e87584a..cbb8c85 100644
--- a/bin/varnishd/cache_backend_cfg.c
+++ b/bin/varnishd/cache_backend_cfg.c
@@ -1,6 +1,6 @@
 /*-
  * Copyright (c) 2006 Verdens Gang AS
- * Copyright (c) 2006-2010 Varnish Software AS
+ * Copyright (c) 2006-2011 Varnish Software AS
  * All rights reserved.
  *
  * Author: Poul-Henning Kamp <phk at phk.freebsd.dk>
diff --git a/bin/varnishd/cache_ban.c b/bin/varnishd/cache_ban.c
index c01a3f6..648997c 100644
--- a/bin/varnishd/cache_ban.c
+++ b/bin/varnishd/cache_ban.c
@@ -51,7 +51,7 @@
  *	(lump) - compiled regexp
  * A lump is:
  *	4 bytes - be32: length
- * 	n bytes - content
+ *	n bytes - content
  *
  * In a perfect world, we should vector through VRE to get to PCRE,
  * but since we rely on PCRE's ability to encode the regexp into a
diff --git a/bin/varnishd/cache_dir.c b/bin/varnishd/cache_dir.c
index 59ef5fc..d4794f9 100644
--- a/bin/varnishd/cache_dir.c
+++ b/bin/varnishd/cache_dir.c
@@ -1,6 +1,6 @@
 /*-
  * Copyright (c) 2006 Verdens Gang AS
- * Copyright (c) 2006-2010 Varnish Software AS
+ * Copyright (c) 2006-2011 Varnish Software AS
  * All rights reserved.
  *
  * Author: Poul-Henning Kamp <phk at phk.freebsd.dk>
diff --git a/bin/varnishd/cache_esi_fetch.c b/bin/varnishd/cache_esi_fetch.c
index 728436c..f414e7b 100644
--- a/bin/varnishd/cache_esi_fetch.c
+++ b/bin/varnishd/cache_esi_fetch.c
@@ -240,7 +240,7 @@ vfp_esi_bytes_ug(struct worker *w, struct http_conn *htc, ssize_t bytes)
  * We receive a gzip'ed object, and want to store it gzip'ed.
  */
 
-static int 
+static int
 vfp_esi_bytes_gg(struct worker *w, struct http_conn *htc, size_t bytes)
 {
 	ssize_t wl;
@@ -391,7 +391,7 @@ vfp_esi_end(struct worker *w)
 		w->vef_priv = NULL;
 		VGZ_UpdateObj(vef->vgz, w->fetch_obj);
 		if (VGZ_Destroy(&vef->vgz,  -1) != VGZ_END)
-			retval = FetchError(w, 
+			retval = FetchError(w,
 			    "ESI+Gzip Failed at the very end");
 		FREE_OBJ(vef);
 	}
diff --git a/bin/varnishd/cache_fetch.c b/bin/varnishd/cache_fetch.c
index ed1e5c8..67bf970 100644
--- a/bin/varnishd/cache_fetch.c
+++ b/bin/varnishd/cache_fetch.c
@@ -277,7 +277,7 @@ fetch_chunked(struct worker *w, struct http_conn *htc)
 				break;
 		}
 
-		if (u >= sizeof buf) 
+		if (u >= sizeof buf)
 			return (FetchError(w,"chunked header too long"));
 
 		/* Skip trailing white space */
@@ -285,7 +285,7 @@ fetch_chunked(struct worker *w, struct http_conn *htc)
 			if (HTC_Read(w, htc, buf + u, 1) <= 0)
 				return (-1);
 
-		if (buf[u] != '\n') 
+		if (buf[u] != '\n')
 			return (FetchError(w,"chunked header no NL"));
 
 		buf[u] = '\0';
@@ -316,7 +316,7 @@ fetch_eof(struct worker *w, struct http_conn *htc)
 
 	assert(w->body_status == BS_EOF);
 	i = w->vfp->bytes(w, htc, SSIZE_MAX);
-	if (i < 0) 
+	if (i < 0)
 		return (-1);
 	return (0);
 }
diff --git a/bin/varnishd/cache_gzip.c b/bin/varnishd/cache_gzip.c
index 1820ffc..6da1595 100644
--- a/bin/varnishd/cache_gzip.c
+++ b/bin/varnishd/cache_gzip.c
@@ -257,7 +257,7 @@ VGZ_ObufStorage(struct worker *w, struct vgz *vg)
 	struct storage *st;
 
 	st = FetchStorage(w, 0);
-	if (st == NULL) 
+	if (st == NULL)
 		return (-1);
 
 	vg->obuf = st;
@@ -487,10 +487,10 @@ vfp_gunzip_bytes(struct worker *w, struct http_conn *htc, ssize_t bytes)
 			bytes -= wl;
 		}
 
-		if (VGZ_ObufStorage(w, vg)) 
+		if (VGZ_ObufStorage(w, vg))
 			return(-1);
 		i = VGZ_Gunzip(vg, &dp, &dl);
-		if (i != VGZ_OK && i != VGZ_END) 
+		if (i != VGZ_OK && i != VGZ_END)
 			return(FetchError(w, "Gunzip data error"));
 		w->fetch_obj->len += dl;
 		if (w->do_stream)
@@ -564,7 +564,7 @@ vfp_gzip_bytes(struct worker *w, struct http_conn *htc, ssize_t bytes)
 			VGZ_Ibuf(vg, ibuf, wl);
 			bytes -= wl;
 		}
-		if (VGZ_ObufStorage(w, vg)) 
+		if (VGZ_ObufStorage(w, vg))
 			return(-1);
 		i = VGZ_Gzip(vg, &dp, &dl, VGZ_NORMAL);
 		assert(i == Z_OK);
@@ -661,7 +661,7 @@ vfp_testgzip_bytes(struct worker *w, struct http_conn *htc, ssize_t bytes)
 		while (!VGZ_IbufEmpty(vg)) {
 			VGZ_Obuf(vg, obuf, sizeof obuf);
 			i = VGZ_Gunzip(vg, &dp, &dl);
-			if (i == VGZ_END && !VGZ_IbufEmpty(vg)) 
+			if (i == VGZ_END && !VGZ_IbufEmpty(vg))
 				return(FetchError(w, "Junk after gzip data"));
 			if (i != VGZ_OK && i != VGZ_END)
 				return(FetchError2(w,
diff --git a/bin/varnishd/cache_httpconn.c b/bin/varnishd/cache_httpconn.c
index 1b718e5..9e0a052 100644
--- a/bin/varnishd/cache_httpconn.c
+++ b/bin/varnishd/cache_httpconn.c
@@ -1,6 +1,6 @@
 /*-
  * Copyright (c) 2006 Verdens Gang AS
- * Copyright (c) 2006-2009 Varnish Software AS
+ * Copyright (c) 2006-2011 Varnish Software AS
  * All rights reserved.
  *
  * Author: Poul-Henning Kamp <phk at phk.freebsd.dk>
diff --git a/bin/varnishd/cache_pipe.c b/bin/varnishd/cache_pipe.c
index 31dcf1a..be17ac9 100644
--- a/bin/varnishd/cache_pipe.c
+++ b/bin/varnishd/cache_pipe.c
@@ -1,6 +1,6 @@
 /*-
  * Copyright (c) 2006 Verdens Gang AS
- * Copyright (c) 2006-2010 Varnish Software AS
+ * Copyright (c) 2006-2011 Varnish Software AS
  * All rights reserved.
  *
  * Author: Poul-Henning Kamp <phk at phk.freebsd.dk>
diff --git a/bin/varnishd/cache_pool.c b/bin/varnishd/cache_pool.c
index 141a0c7..aed596e 100644
--- a/bin/varnishd/cache_pool.c
+++ b/bin/varnishd/cache_pool.c
@@ -451,13 +451,13 @@ pool_herder(void *priv)
 		}
 
 		pool_breed(pp, &tp_attr);
-		
+
 		if (pp->nthr < params->wthread_min)
 			continue;
 
 		AZ(clock_gettime(CLOCK_MONOTONIC, &ts));
 		ts.tv_sec += params->wthread_purge_delay / 1000;
-		ts.tv_nsec += 
+		ts.tv_nsec +=
 		    (params->wthread_purge_delay % 1000) * 1000000;
 		if (ts.tv_nsec >= 1000000000) {
 			ts.tv_sec++;
@@ -470,7 +470,7 @@ pool_herder(void *priv)
 		if (!i)
 			continue;
 
-		if (pp->nthr <= params->wthread_min) 
+		if (pp->nthr <= params->wthread_min)
 			continue;
 
 		t_idle = VTIM_real() - params->wthread_timeout;
@@ -480,7 +480,7 @@ pool_herder(void *priv)
 		VSC_C_main->sess_dropped += pp->ndropped;
 		pp->nqueued = pp->ndropped = 0;
 		w = VTAILQ_LAST(&pp->idle, workerhead);
-		if (w != NULL &&  
+		if (w != NULL &&
 		    (w->lastused < t_idle || pp->nthr > params->wthread_max)) {
 			VTAILQ_REMOVE(&pp->idle, w, list);
 		} else
@@ -567,12 +567,12 @@ pool_poolherder(void *priv)
 				VSC_C_main->pools++;
 				nwq++;
 				continue;
-			} 
+			}
 		}
 		/* XXX: remove pools */
 		(void)sleep(1);
 		u = 0;
-		VTAILQ_FOREACH(pp, &pools, list) 
+		VTAILQ_FOREACH(pp, &pools, list)
 			u += pp->lqueue;
 		VSC_C_main->thread_queue_len = u;
 	}
diff --git a/bin/varnishd/mgt/mgt_sandbox_solaris.c b/bin/varnishd/mgt/mgt_sandbox_solaris.c
index f243938..becaa2e 100644
--- a/bin/varnishd/mgt/mgt_sandbox_solaris.c
+++ b/bin/varnishd/mgt/mgt_sandbox_solaris.c
@@ -48,7 +48,7 @@
 
 /*--------------------------------------------------------------------
  * SOLARIS PRIVILEGES: Note on use of symbolic PRIV_* constants
- * 
+ *
  * For privileges which existed in Solaris 10 FCS, we may use the constants from
  * sys/priv_names.h
  *
@@ -140,7 +140,7 @@ mgt_sandbox_solaris_init(void)
 		    errno, strerror(errno));
 		return;
 	}
-	
+
 	priv_emptyset(priv_all);
 
 	mgt_sandbox_solaris_add_effective(priv_all);
@@ -168,7 +168,7 @@ mgt_sandbox_solaris_privsep(void)
         }
 }
 
-/* 
+/*
  * Waive most privileges in the child
  *
  * as of onnv_151a, we should end up with:
@@ -206,7 +206,7 @@ mgt_sandbox_solaris_fini(void)
 	priv_copyset(effective, permitted);
 	mgt_sandbox_solaris_add_permitted(permitted);
 
-	/* 
+	/*
 	 * invert the sets and clear privileges such that setppriv will always
 	 * succeed
 	 */
diff --git a/bin/varnishhist/varnishhist.c b/bin/varnishhist/varnishhist.c
index 692eb81..a4bc6b7 100644
--- a/bin/varnishhist/varnishhist.c
+++ b/bin/varnishhist/varnishhist.c
@@ -1,6 +1,6 @@
 /*-
  * Copyright (c) 2006 Verdens Gang AS
- * Copyright (c) 2006-2010 Varnish Software AS
+ * Copyright (c) 2006-2011 Varnish Software AS
  * All rights reserved.
  *
  * Author: Poul-Henning Kamp <phk at phk.freebsd.dk>
diff --git a/bin/varnishstat/varnishstat.c b/bin/varnishstat/varnishstat.c
index b5d6df3..d0ef409 100644
--- a/bin/varnishstat/varnishstat.c
+++ b/bin/varnishstat/varnishstat.c
@@ -311,6 +311,6 @@ main(int argc, char * const *argv)
 		printf("\n");
 
 		sleep(delay);
-	} 
+	}
 	exit(0);
 }
diff --git a/bin/varnishtest/vtc_log.c b/bin/varnishtest/vtc_log.c
index 57fa27a..890a98b 100644
--- a/bin/varnishtest/vtc_log.c
+++ b/bin/varnishtest/vtc_log.c
@@ -150,7 +150,7 @@ vtc_log(struct vtclog *vl, int lvl, const char *fmt, ...)
 	AZ(pthread_mutex_unlock(&vl->mtx));
 	if (lvl > 0)
 		return;
-	if (lvl == 0) 
+	if (lvl == 0)
 		vtc_error = 1;
 	if (pthread_self() != vtc_thread)
 		pthread_exit(NULL);
diff --git a/include/tbl/vsc_fields.h b/include/tbl/vsc_fields.h
index 904a9e2..abc5d18 100644
--- a/include/tbl/vsc_fields.h
+++ b/include/tbl/vsc_fields.h
@@ -81,48 +81,48 @@ VSC_F(sess_fail,		uint64_t, 1, 'c',
 
 /*---------------------------------------------------------------------*/
 
-VSC_F(client_req,		uint64_t, 1, 'a', 
-      "Client requests received", 
+VSC_F(client_req,		uint64_t, 1, 'a',
+      "Client requests received",
       "")
 
-VSC_F(cache_hit,		uint64_t, 1, 'a', 
-      "Cache hits", 
+VSC_F(cache_hit,		uint64_t, 1, 'a',
+      "Cache hits",
       "Count of cache hits. "
       "  A cache hit indicates that an object has been delivered to a"
       "  client without fetching it from a backend server."
 )
 
-VSC_F(cache_hitpass,	uint64_t, 1, 'a', 
-      "Cache hits for pass", 
+VSC_F(cache_hitpass,	uint64_t, 1, 'a',
+      "Cache hits for pass",
       "Count of hits for pass"
       "  A cache hit for pass indicates that Varnish is going to"
       "  pass the request to the backend and this decision has been "
       "  cached in it self. This counts how many times the cached "
       "  decision is being used."
 )
-VSC_F(cache_miss,		uint64_t, 1, 'a', 
-      "Cache misses", 
+VSC_F(cache_miss,		uint64_t, 1, 'a',
+      "Cache misses",
       "Count of misses"
       "  A cache miss indicates the object was fetched from the"
       "  backend before delivering it to the backend.")
 
-VSC_F(backend_conn,	uint64_t, 0, 'a', 
-      "Backend conn. success", 
+VSC_F(backend_conn,	uint64_t, 0, 'a',
+      "Backend conn. success",
       "")
 
-VSC_F(backend_unhealthy,	uint64_t, 0, 'a', 
-      "Backend conn. not attempted", 
+VSC_F(backend_unhealthy,	uint64_t, 0, 'a',
+      "Backend conn. not attempted",
       ""
 )
 VSC_F(backend_busy,	uint64_t, 0, 'a', "Backend conn. too many", "")
 VSC_F(backend_fail,	uint64_t, 0, 'a', "Backend conn. failures", "")
-VSC_F(backend_reuse,	uint64_t, 0, 'a', 
-      "Backend conn. reuses", 
+VSC_F(backend_reuse,	uint64_t, 0, 'a',
+      "Backend conn. reuses",
       "Count of backend connection reuses"
       "  This counter is increased whenever we reuse a recycled connection.")
 VSC_F(backend_toolate,	uint64_t, 0, 'a', "Backend conn. was closed", "")
-VSC_F(backend_recycle,	uint64_t, 0, 'a', 
-      "Backend conn. recycles", 
+VSC_F(backend_recycle,	uint64_t, 0, 'a',
+      "Backend conn. recycles",
       "Count of backend connection recycles"
       "  This counter is increased whenever we have a keep-alive"
       "  connection that is put back into the pool of connections."
@@ -255,10 +255,10 @@ VSC_F(n_lru_moved,		uint64_t, 0, 'i', "N LRU moved objects", "")
 
 VSC_F(losthdr,		uint64_t, 0, 'a', "HTTP header overflows", "")
 
-VSC_F(n_objsendfile,	uint64_t, 0, 'a', "Objects sent with sendfile", 
+VSC_F(n_objsendfile,	uint64_t, 0, 'a', "Objects sent with sendfile",
       "The number of objects sent with the sendfile system call. If enabled "
       "sendfile will be used on object larger than a certain size.")
-VSC_F(n_objwrite,		uint64_t, 0, 'a', "Objects sent with write", 
+VSC_F(n_objwrite,		uint64_t, 0, 'a', "Objects sent with write",
       "The number of objects sent with regular write calls."
       "Writes are used when the objects are too small for sendfile "
       "or if the sendfile call has been disabled")
diff --git a/lib/libvarnish/vre.c b/lib/libvarnish/vre.c
index cffe396..eac8121 100644
--- a/lib/libvarnish/vre.c
+++ b/lib/libvarnish/vre.c
@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 2006-2009 Varnish Software AS
+ * Copyright (c) 2006-2011 Varnish Software AS
  * All rights reserved.
  *
  * Author: Tollef Fog Heen <tfheen at redpill-linpro.com>
diff --git a/lib/libvarnish/vtcp.c b/lib/libvarnish/vtcp.c
index c0f7a95..21de7f2 100644
--- a/lib/libvarnish/vtcp.c
+++ b/lib/libvarnish/vtcp.c
@@ -265,7 +265,7 @@ VTCP_set_read_timeout(int s, double seconds)
 	timeout.tv_sec = (int)floor(seconds);
 	timeout.tv_usec = (int)(1e6 * (seconds - timeout.tv_sec));
 #ifdef SO_RCVTIMEO_WORKS
-	/* 
+	/*
 	 * Solaris bug (present at least in snv_151 and older): If this fails
 	 * with EINVAL, the socket is half-closed (SS_CANTSENDMORE) and the
 	 * timeout does not get set. Needs to be fixed in Solaris, there is



More information about the varnish-commit mailing list