[master] 1473576 Whitespace OCD

Poul-Henning Kamp phk at FreeBSD.org
Tue Sep 23 10:44:24 CEST 2014


commit 1473576fea26089fccb50a886e84cf0ac5cd39a7
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Tue Sep 23 08:44:08 2014 +0000

    Whitespace OCD

diff --git a/lib/libvmod_directors/vmod.vcc b/lib/libvmod_directors/vmod.vcc
index bbfa0eb..fe8f998 100644
--- a/lib/libvmod_directors/vmod.vcc
+++ b/lib/libvmod_directors/vmod.vcc
@@ -47,9 +47,9 @@ want to emulate the previous behavior of Varnish 3.0 you can just
 initialize the directors in vcl_init, like this:::
 
     sub vcl_init {
-        new vdir = directors.round_robin();
-        vdir.add_backend(backend1);
-        vdir.add_backend(backend2);
+	new vdir = directors.round_robin();
+	vdir.add_backend(backend1);
+	vdir.add_backend(backend2);
     }
 
 As you can see there is nothing keeping you from manipulating the
@@ -61,7 +61,7 @@ Note that directors can use other directors as backends.
 $Object round_robin()
 
 Description
-        Create a round robin director.
+	Create a round robin director.
 
 	This director will pick backends in a round robin fashion.
 Example
@@ -86,18 +86,18 @@ Example
 $Object fallback()
 
 Description
-        Create a fallback director.
+	Create a fallback director.
 
-        A fallback director will try each of the added backends in turn,
-        and return the first one that is healthy.
+	A fallback director will try each of the added backends in turn,
+	and return the first one that is healthy.
 
 Example
-        new vdir = directors.fallback();
+	new vdir = directors.fallback();
 
 $Method VOID .add_backend(BACKEND)
 
 Description
-        Add a backend to the director.
+	Add a backend to the director.
 
 	Note that the order in which this is done matters for the fallback
 	director.
diff --git a/lib/libvmod_std/vmod.vcc b/lib/libvmod_std/vmod.vcc
index ad832d1..61c539f 100644
--- a/lib/libvmod_std/vmod.vcc
+++ b/lib/libvmod_std/vmod.vcc
@@ -194,9 +194,9 @@ Example
 $Function STRING querysort(STRING)
 
 Description
-        Sorts the querystring for cache normalization purposes.
+	Sorts the querystring for cache normalization purposes.
 Example
-        set req.url = std.querysort(req.url);
+	set req.url = std.querysort(req.url);
 
 $Function VOID cache_req_body(BYTES)
 
@@ -214,12 +214,12 @@ Description
 	string. Note that the comparison is case sensitive. You can
 	use the tolower function on both strings if you want case
 	insensitivity.
-	
-        If there is no match a NULL pointer is returned which would
-        evaluate to false in an if-test.
+
+	If there is no match a NULL pointer is returned which would
+	evaluate to false in an if-test.
 
 Example
-	if (std.strstr(req.url, req.http.x-restrict)) 
+	if (std.strstr(req.url, req.http.x-restrict))
 
 
 
diff --git a/lib/libvmod_std/vmod_std.c b/lib/libvmod_std/vmod_std.c
index a3635e9..ad0066a 100644
--- a/lib/libvmod_std/vmod_std.c
+++ b/lib/libvmod_std/vmod_std.c
@@ -242,12 +242,11 @@ vmod_cache_req_body(const struct vrt_ctx *ctx, VCL_BYTES size)
 
 VCL_STRING __match_proto__(td_std_strstr)
 vmod_strstr(const struct vrt_ctx *ctx, VCL_STRING mstr, VCL_STRING msubstr)
-{ 
-        CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
+{
+	CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
 
-        if ((mstr == NULL) || (msubstr == NULL))
+	if ((mstr == NULL) || (msubstr == NULL))
 		return (NULL);
-	else
-		return(strstr(mstr, msubstr));
+	return(strstr(mstr, msubstr));
 }
 



More information about the varnish-commit mailing list