[master] dd74a96 OCD patch: return (x)

Poul-Henning Kamp phk at varnish-cache.org
Thu Nov 10 16:55:51 CET 2011


commit dd74a963e2a1ea84275ff67aef905c33cc6edc39
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Thu Nov 10 10:54:49 2011 +0000

    OCD patch:  return (x)

diff --git a/bin/varnishd/cache_backend.c b/bin/varnishd/cache_backend.c
index e9d0323..1f290c3 100644
--- a/bin/varnishd/cache_backend.c
+++ b/bin/varnishd/cache_backend.c
@@ -412,7 +412,7 @@ vdi_get_backend_if_simple(const struct director *d)
 
 	vs2 = d->priv;
 	if (vs2->magic != VDI_SIMPLE_MAGIC)
-		return NULL;
+		return (NULL);
 	CAST_OBJ_NOTNULL(vs, d->priv, VDI_SIMPLE_MAGIC);
 	return (vs->backend);
 }
diff --git a/bin/varnishd/cache_vrt.c b/bin/varnishd/cache_vrt.c
index 3851de7..c20b552 100644
--- a/bin/varnishd/cache_vrt.c
+++ b/bin/varnishd/cache_vrt.c
@@ -342,7 +342,7 @@ VRT_time_string(const struct sess *sp, double t)
 
 	AN(p = WS_Alloc(sp->http->ws, VTIM_FORMAT_SIZE));
 	VTIM_format(t, p);
-	return p;
+	return (p);
 }
 
 const char *
diff --git a/bin/varnishd/cache_vrt_var.c b/bin/varnishd/cache_vrt_var.c
index 92d8451..7a5aed0 100644
--- a/bin/varnishd/cache_vrt_var.c
+++ b/bin/varnishd/cache_vrt_var.c
@@ -485,9 +485,9 @@ VRT_r_server_identity(struct sess *sp)
 	(void)sp;
 
 	if (heritage.identity[0] != '\0')
-		return heritage.identity;
+		return (heritage.identity);
 	else
-		return heritage.name;
+		return (heritage.name);
 }
 
 
diff --git a/bin/varnishd/hash/hash_critbit.c b/bin/varnishd/hash/hash_critbit.c
index b1c9cf3..fd50b26 100644
--- a/bin/varnishd/hash/hash_critbit.c
+++ b/bin/varnishd/hash/hash_critbit.c
@@ -57,7 +57,7 @@ static unsigned char hcb_bittbl[256];
 static unsigned char
 hcb_bits(unsigned char x, unsigned char y)
 {
-	return hcb_bittbl[x ^ y];
+	return (hcb_bittbl[x ^ y]);
 }
 
 static void
diff --git a/bin/varnishd/waiter/cache_waiter_epoll.c b/bin/varnishd/waiter/cache_waiter_epoll.c
index b5068a6..46cb288 100644
--- a/bin/varnishd/waiter/cache_waiter_epoll.c
+++ b/bin/varnishd/waiter/cache_waiter_epoll.c
@@ -200,7 +200,7 @@ vwe_thread(void *priv)
 			SES_Delete(sp, "timeout");
 		}
 	}
-	return NULL;
+	return (NULL);
 }
 
 /*--------------------------------------------------------------------*/
@@ -219,7 +219,7 @@ vwe_sess_timeout_ticker(void *priv)
 		assert(write(vwe->timer_pipes[1], &ticker, 1));
 		VTIM_sleep(100 * 1e-3);
 	}
-	return NULL;
+	return (NULL);
 }
 
 /*--------------------------------------------------------------------*/
diff --git a/bin/varnishncsa/varnishncsa.c b/bin/varnishncsa/varnishncsa.c
index 8d969eb..9765796 100644
--- a/bin/varnishncsa/varnishncsa.c
+++ b/bin/varnishncsa/varnishncsa.c
@@ -200,11 +200,11 @@ req_header(struct logline *l, const char *name)
 	struct hdr *h;
 	VTAILQ_FOREACH(h, &l->req_headers, list) {
 		if (strcasecmp(h->key, name) == 0) {
-			return h->value;
+			return (h->value);
 			break;
 		}
 	}
-	return NULL;
+	return (NULL);
 }
 
 static char *
@@ -213,11 +213,11 @@ resp_header(struct logline *l, const char *name)
 	struct hdr *h;
 	VTAILQ_FOREACH(h, &l->resp_headers, list) {
 		if (strcasecmp(h->key, name) == 0) {
-			return h->value;
+			return (h->value);
 			break;
 		}
 	}
-	return NULL;
+	return (NULL);
 }
 
 static char *
@@ -226,11 +226,11 @@ vcl_log(struct logline *l, const char *name)
 	struct hdr *h;
 	VTAILQ_FOREACH(h, &l->vcl_log, list) {
 		if (strcasecmp(h->key, name) == 0) {
-			return h->value;
+			return (h->value);
 			break;
 		}
 	}
-	return NULL;
+	return (NULL);
 }
 
 static void
diff --git a/lib/libvarnish/vtcp.c b/lib/libvarnish/vtcp.c
index 21de7f2..d15f516 100644
--- a/lib/libvarnish/vtcp.c
+++ b/lib/libvarnish/vtcp.c
@@ -61,11 +61,11 @@ VTCP_port(const struct sockaddr_storage *addr)
 
 	if (addr->ss_family == AF_INET) {
 		const struct sockaddr_in *ain = (const void *)addr;
-		return ntohs((ain->sin_port));
+		return (ntohs((ain->sin_port)));
 	}
 	if (addr->ss_family == AF_INET6) {
 		const struct sockaddr_in6 *ain = (const void *)addr;
-		return ntohs((ain->sin6_port));
+		return (ntohs((ain->sin6_port)));
 	}
 	return (-1);
 }
diff --git a/man/vsc2rst.c b/man/vsc2rst.c
index bf4091f..18250d8 100644
--- a/man/vsc2rst.c
+++ b/man/vsc2rst.c
@@ -64,6 +64,6 @@ int main(int argc, char **argv)
 #include "tbl/vsc_fields.h"
 #undef VSC_DO_VBE
 
-	return 0;
+	return (0);
 }
 



More information about the varnish-commit mailing list