[4.1] 9b2c32f Mostly whitespace OCD

Lasse Karstensen lkarsten at varnish-software.com
Tue Jun 14 11:42:09 CEST 2016


commit 9b2c32f9f04a686025804f5dfcd3b2ea598ace68
Author: Federico G. Schwindt <fgsch at lodoss.net>
Date:   Thu May 5 16:19:36 2016 +0100

    Mostly whitespace OCD
    
    Reduces my stash list to 62 entries.
    
    Conflicts:
    	doc/sphinx/dev-guide/index.rst

diff --git a/bin/varnishd/cache/cache_ws.c b/bin/varnishd/cache/cache_ws.c
index c105119..e8f9b7f 100644
--- a/bin/varnishd/cache/cache_ws.c
+++ b/bin/varnishd/cache/cache_ws.c
@@ -134,7 +134,7 @@ WS_Alloc(struct ws *ws, unsigned bytes)
 	assert(ws->r == NULL);
 	if (ws->f + bytes > ws->e) {
 		WS_MarkOverflow(ws);
-		return(NULL);
+		return (NULL);
 	}
 	r = ws->f;
 	ws->f += bytes;
@@ -159,7 +159,7 @@ WS_Copy(struct ws *ws, const void *str, int len)
 	bytes = PRNDUP((unsigned)len);
 	if (ws->f + bytes > ws->e) {
 		WS_MarkOverflow(ws);
-		return(NULL);
+		return (NULL);
 	}
 	r = ws->f;
 	ws->f += bytes;
diff --git a/bin/varnishncsa/varnishncsa.c b/bin/varnishncsa/varnishncsa.c
index a5e1485..bf41276 100644
--- a/bin/varnishncsa/varnishncsa.c
+++ b/bin/varnishncsa/varnishncsa.c
@@ -629,11 +629,10 @@ parse_x_format(char *buf)
 	if (!strncmp(buf, "VSL:", 4)) {
 		buf += 4;
 		e = buf;
-		while(*e != '\0')
+		while (*e != '\0')
 			e++;
-		if (e == buf) {
+		if (e == buf)
 			VUT_Error(1, "Missing tag in VSL:");
-		}
 		if (e[-1] == ']') {
 			r = e - 1;
 			while (r > buf && *r != '[')
diff --git a/lib/libvmod_debug/vmod_debug.c b/lib/libvmod_debug/vmod_debug.c
index f5d5326..f16953b 100644
--- a/lib/libvmod_debug/vmod_debug.c
+++ b/lib/libvmod_debug/vmod_debug.c
@@ -191,7 +191,7 @@ vmod_argtest(VRT_CTX, VCL_STRING one, VCL_REAL two, VCL_STRING three,
 	char buf[100];
 
 	bprintf(buf, "%s %g %s %s", one, two, three, comma);
-	return WS_Copy(ctx->ws, buf, -1);
+	return (WS_Copy(ctx->ws, buf, -1));
 }
 
 VCL_INT
@@ -350,10 +350,10 @@ event_function(VRT_CTX, struct vmod_priv *priv, enum vcl_event_e e)
 {
 
 	switch (e) {
-		case VCL_EVENT_LOAD: return event_load(ctx, priv);
-		case VCL_EVENT_WARM: return event_warm(ctx, priv);
-		case VCL_EVENT_COLD: return event_cold(ctx, priv);
-		default: return (0);
+	case VCL_EVENT_LOAD: return event_load(ctx, priv);
+	case VCL_EVENT_WARM: return event_warm(ctx, priv);
+	case VCL_EVENT_COLD: return event_cold(ctx, priv);
+	default: return (0);
 	}
 }
 
@@ -365,16 +365,18 @@ vmod_sleep(VRT_CTX, VCL_DURATION t)
 	VTIM_sleep(t);
 }
 
-static struct ws *wsfind(VRT_CTX, VCL_ENUM which) {
-	if (!strcmp(which, "client")) {
-		return ctx->ws;
-	} else if (!strcmp(which, "backend")) {
-		return ctx->bo->ws;
-	} else if (!strcmp(which, "session")) {
-		return ctx->req->sp->ws;
-	} else if (!strcmp(which, "thread")) {
-		return ctx->req->wrk->aws;
-	} else
+static struct ws *
+wsfind(VRT_CTX, VCL_ENUM which)
+{
+	if (!strcmp(which, "client"))
+		return (ctx->ws);
+	else if (!strcmp(which, "backend"))
+		return (ctx->bo->ws);
+	else if (!strcmp(which, "session"))
+		return (ctx->req->sp->ws);
+	else if (!strcmp(which, "thread"))
+		return (ctx->req->wrk->aws);
+	else
 		WRONG("No such workspace.");
 }
 
@@ -423,6 +425,7 @@ vmod_workspace_overflowed(VRT_CTX, VCL_ENUM which)
 }
 
 static char *debug_ws_snap;
+
 void
 vmod_workspace_snap(VRT_CTX, VCL_ENUM which)
 {



More information about the varnish-commit mailing list