[master] 0051cbe3b Import from VTest: Don't use explicit buffer size with no buffer

Poul-Henning Kamp phk at FreeBSD.org
Thu Oct 15 08:04:06 UTC 2020


commit 0051cbe3b9cc24586e0ad99cff72041c6df944b8
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Thu Oct 15 07:35:04 2020 +0000

    Import from VTest: Don't use explicit buffer size with no buffer

diff --git a/bin/varnishtest/vtc_main.c b/bin/varnishtest/vtc_main.c
index 1deea4ab7..3c3887450 100644
--- a/bin/varnishtest/vtc_main.c
+++ b/bin/varnishtest/vtc_main.c
@@ -698,7 +698,7 @@ main(int argc, char * const *argv)
 	else
 		tmppath = strdup("/tmp");
 
-	cwd = getcwd(NULL, PATH_MAX);
+	cwd = getcwd(NULL, 0);
 	extmacro_def("pwd", "%s", cwd);
 
 	vmod_path = NULL;


More information about the varnish-commit mailing list