[master] 7585d89 Sort things tbl/vcl_returns.h

Poul-Henning Kamp phk at FreeBSD.org
Tue Jun 30 07:38:05 CEST 2015


commit 7585d89ac28eb9be95d6c9510b8f77ecae1b8c2e
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon Jun 29 20:21:46 2015 +0000

    Sort things tbl/vcl_returns.h
    
    Various white-space fixes

diff --git a/CONTRIBUTING b/CONTRIBUTING
index 94a668f..3f15742 100644
--- a/CONTRIBUTING
+++ b/CONTRIBUTING
@@ -15,4 +15,3 @@ Patches can be sent to varnish-dev at varnish-cache.org.
 
 Documentation fixes and other small items for the documentation team may be
 sent as Github pull requests.
-
diff --git a/bin/varnishd/cache/cache_backend.h b/bin/varnishd/cache/cache_backend.h
index 489cccb..cc27de6 100644
--- a/bin/varnishd/cache/cache_backend.h
+++ b/bin/varnishd/cache/cache_backend.h
@@ -132,4 +132,3 @@ void VBT_Close(struct tcp_pool *tp, struct vbc **vbc);
 struct vbc *VBT_Get(struct tcp_pool *, double tmo, const struct backend *,
     struct worker *);
 void VBT_Wait(struct worker *, struct vbc *);
-
diff --git a/bin/varnishd/cache/cache_ban.c b/bin/varnishd/cache/cache_ban.c
index 2124c33..699bcf5 100644
--- a/bin/varnishd/cache/cache_ban.c
+++ b/bin/varnishd/cache/cache_ban.c
@@ -1098,7 +1098,9 @@ ban_lurker_test_ban(struct worker *wrk, struct vsl_log *vsl, struct ban *bt,
 		if (i) {
 			VSLb(vsl, SLT_ExpBan, "%u banned by lurker",
 			    ObjGetXID(wrk, oc));
-			EXP_Rearm(oc, oc->exp.t_origin, 0, 0, 0); // XXX fake now
+
+			EXP_Rearm(oc, oc->exp.t_origin, 0, 0, 0);
+					// XXX ^ fake now
 			VSC_C_main->bans_lurker_obj_killed++;
 		}
 		(void)HSH_DerefObjCore(wrk, &oc);
diff --git a/bin/varnishd/http1/cache_http1.h b/bin/varnishd/http1/cache_http1.h
index 66addc5..f717b78 100644
--- a/bin/varnishd/http1/cache_http1.h
+++ b/bin/varnishd/http1/cache_http1.h
@@ -61,4 +61,3 @@ void V1L_Reserve(struct worker *, struct ws *, int *fd, struct vsl_log *,
 unsigned V1L_Flush(const struct worker *w);
 unsigned V1L_FlushRelease(struct worker *w);
 size_t V1L_Write(const struct worker *w, const void *ptr, ssize_t len);
-
diff --git a/bin/varnishd/mgt/mgt.h b/bin/varnishd/mgt/mgt.h
index 86fcdee..2b680c6 100644
--- a/bin/varnishd/mgt/mgt.h
+++ b/bin/varnishd/mgt/mgt.h
@@ -151,7 +151,8 @@ void STV_Config(const char *spec);
 void STV_Config_Transient(void);
 
 /* mgt_vcc.c */
-char *mgt_VccCompile(struct cli *cli, const char *vclname, const char *vclsrc, int C_flag);
+char *mgt_VccCompile(struct cli *, const char *vclname, const char *vclsrc,
+    int C_flag);
 void mgt_vcc_init(void);
 
 void mgt_vcl_init(void);
diff --git a/bin/varnishd/mgt/mgt_sandbox.c b/bin/varnishd/mgt/mgt_sandbox.c
index f0c0443..1f0962d 100644
--- a/bin/varnishd/mgt/mgt_sandbox.c
+++ b/bin/varnishd/mgt/mgt_sandbox.c
@@ -233,7 +233,8 @@ mgt_sandbox_unix(enum sandbox_e who)
 
 #ifdef __linux__
 	/*
-	 * On linux mucking about with uid/gid disables core-dumps,			 * reenable them again.
+	 * On linux mucking about with uid/gid disables core-dumps,
+	 * reenable them again.
 	 */
 	if (prctl(PR_SET_DUMPABLE, 1) != 0) {
 		REPORT0(LOG_INFO,
diff --git a/include/vlu.h b/include/vlu.h
index b001523..1b5cd4a 100644
--- a/include/vlu.h
+++ b/include/vlu.h
@@ -14,7 +14,7 @@
  * 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/include/vsub.h b/include/vsub.h
index 274663a..bc337a1 100644
--- a/include/vsub.h
+++ b/include/vsub.h
@@ -31,5 +31,5 @@
 /* from libvarnish/subproc.c */
 typedef void vsub_func_f(void*);
 
-unsigned VSUB_run(struct vsb *sb, vsub_func_f *func, void *priv, const char *name,
+unsigned VSUB_run(struct vsb *, vsub_func_f *, void *priv, const char *name,
     int maxlines);
diff --git a/lib/libvcc/generate.py b/lib/libvcc/generate.py
index 39810fc..6d6915a 100755
--- a/lib/libvcc/generate.py
+++ b/lib/libvcc/generate.py
@@ -976,24 +976,28 @@ fo.write("\n/*lint -save -e525 -e539 */\n")
 fo.write("\n#ifdef VCL_RET_MAC\n")
 l = list(rets.keys())
 l.sort()
+ll = list(returns)
+ll.sort()
 for i in l:
 	fo.write("VCL_RET_MAC(%s, %s" % (i.lower(), i.upper()))
-	s=", "
-	for j in returns:
+	s=",\n\t"
+	for j in ll:
 		if i in j[2]:
 			fo.write("%sVCL_MET_%s" % (s, j[0].upper()))
-			s = " | "
-	fo.write(")\n")
+			s = " |\n\t"
+	fo.write("\n)\n")
 fo.write("#endif\n")
 
 fo.write("\n#ifdef VCL_MET_MAC\n")
-for i in returns:
-	fo.write("VCL_MET_MAC(%s,%s,\n" % (i[0].lower(), i[0].upper()))
-	p = " ("
-	for j in i[2]:
-		fo.write("    %s(1U << VCL_RET_%s)\n" % (p, j.upper()))
-		p = "| "
-	fo.write("))\n")
+for i in ll:
+	fo.write("VCL_MET_MAC(%s, %s," % (i[0].lower(), i[0].upper()))
+	p = " (\n\t"
+	lll = list(i[2])
+	lll.sort()
+	for j in lll:
+		fo.write("%s(1U << VCL_RET_%s)" % (p, j.upper()))
+		p = " |\n\t"
+	fo.write("\n))\n")
 fo.write("#endif\n")
 fo.write("\n/*lint -restore */\n")
 fo.close()
@@ -1035,7 +1039,9 @@ def tbl40(a, b):
 fo.write("\n/* VCL Methods */\n")
 n = 1
 for i in returns:
-	fo.write(tbl40("#define VCL_MET_%s" % i[0].upper(),  "(1U << %d)\n" % n))
+	fo.write(
+	    tbl40("#define VCL_MET_%s" % i[0].upper(), "(1U << %d)\n" % n)
+	)
 	n += 1
 
 fo.write("\n" + tbl40("#define VCL_MET_MAX", "%d\n" % n))
diff --git a/lib/libvcc/vcc_expr.c b/lib/libvcc/vcc_expr.c
index df5aa43..b9c6531 100644
--- a/lib/libvcc/vcc_expr.c
+++ b/lib/libvcc/vcc_expr.c
@@ -79,7 +79,8 @@ vcc_TimeUnit(struct vcc *tl)
 	else {
 		VSB_printf(tl->sb, "Unknown time unit ");
 		vcc_ErrToken(tl, tl->t);
-		VSB_printf(tl->sb, ".  Legal are 'ms', 's', 'm', 'h', 'd', 'w' and 'y'\n");
+		VSB_printf(tl->sb,
+		    ".  Legal are 'ms', 's', 'm', 'h', 'd', 'w' and 'y'\n");
 		vcc_ErrWhere(tl, tl->t);
 		return (1.0);
 	}
diff --git a/lib/libvmod_directors/vmod.vcc b/lib/libvmod_directors/vmod.vcc
index ccfdce1..2e958a7 100644
--- a/lib/libvmod_directors/vmod.vcc
+++ b/lib/libvmod_directors/vmod.vcc
@@ -178,5 +178,5 @@ Description
 
 	Use the string or list of strings provided to pick the backend.
 Example
-	set req.backend_hint = vdir.backend(req.http.cookie);  # pick a backend based on the cookie header from the client
-
+	# pick a backend based on the cookie header from the client
+	set req.backend_hint = vdir.backend(req.http.cookie);
diff --git a/lib/libvmod_std/vmod_std.c b/lib/libvmod_std/vmod_std.c
index 097cd45..e8478e8 100644
--- a/lib/libvmod_std/vmod_std.c
+++ b/lib/libvmod_std/vmod_std.c
@@ -247,4 +247,3 @@ vmod_strstr(VRT_CTX, VCL_STRING s1, VCL_STRING s2)
 		return (NULL);
 	return (strstr(s1, s2));
 }
-



More information about the varnish-commit mailing list