[master] 3ab1e30 Polish

Poul-Henning Kamp phk at FreeBSD.org
Mon Apr 13 10:41:25 CEST 2015


commit 3ab1e305cde25fb323e72a15a8152f12ff1fe2f1
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon Apr 13 08:41:17 2015 +0000

    Polish

diff --git a/bin/varnishd/mgt/mgt_sandbox.c b/bin/varnishd/mgt/mgt_sandbox.c
index df7eadb..f0c0443 100644
--- a/bin/varnishd/mgt/mgt_sandbox.c
+++ b/bin/varnishd/mgt/mgt_sandbox.c
@@ -245,7 +245,7 @@ mgt_sandbox_unix(enum sandbox_e who)
 
 /*--------------------------------------------------------------------*/
 
-static void __match_proto__(sub_func_f)
+static void __match_proto__(vsub_func_f)
 run_sandbox_test(void *priv)
 {
 
diff --git a/bin/varnishd/mgt/mgt_vcc.c b/bin/varnishd/mgt/mgt_vcc.c
index 6e98c1f..78c9169 100644
--- a/bin/varnishd/mgt/mgt_vcc.c
+++ b/bin/varnishd/mgt/mgt_vcc.c
@@ -77,7 +77,7 @@ static const char * const builtin_vcl =
  * Invoke system VCC compiler in a sub-process
  */
 
-static void
+static void __match_proto__(vsub_func_f)
 run_vcc(void *priv)
 {
 	char *csrc;
@@ -122,7 +122,7 @@ run_vcc(void *priv)
  * Invoke system C compiler in a sub-process
  */
 
-static void
+static void __match_proto__(vsub_func_f)
 run_cc(void *priv)
 {
 	struct vcc_priv *vp;
@@ -172,7 +172,7 @@ run_cc(void *priv)
  * Attempt to open compiled VCL in a sub-process
  */
 
-static void __match_proto__(sub_func_f)
+static void __match_proto__(vsub_func_f)
 run_dlopen(void *priv)
 {
 	void *dlh;
diff --git a/bin/varnishtest/tests/b00046.vtc b/bin/varnishtest/tests/b00046.vtc
index 95d64bb..2c60f66 100644
--- a/bin/varnishtest/tests/b00046.vtc
+++ b/bin/varnishtest/tests/b00046.vtc
@@ -5,7 +5,7 @@ server s1 {
 	send_urgent " "
 	txresp
 	send_urgent " "
-	
+
 	rxreq
 	send_urgent " "
 	txresp
diff --git a/lib/libvarnish/vsub.c b/lib/libvarnish/vsub.c
index 71c9670..cf71c26 100644
--- a/lib/libvarnish/vsub.c
+++ b/lib/libvarnish/vsub.c
@@ -100,13 +100,13 @@ VSUB_run(struct vsb *sb, vsub_func_f *func, void *priv, const char *name,
 		assert(dup2(p[1], STDOUT_FILENO) == STDOUT_FILENO);
 		assert(dup2(p[1], STDERR_FILENO) == STDERR_FILENO);
 		/* Close all other fds */
-		for (sfd = STDERR_FILENO + 1; sfd < 100; sfd++)
+		for (sfd = STDERR_FILENO+1; sfd < sysconf(_SC_OPEN_MAX); sfd++)
 			(void)close(sfd);
 		func(priv);
 		/*
 		 * func should either exec or exit, so getting here should be
 		 * treated like an assertion failure - except that we don't know
-		 * if it's save to trigger an acutal assertion
+		 * if it's safe to trigger an acutal assertion
 		 */
 		_exit(4);
 	}



More information about the varnish-commit mailing list