[master] 673a855 Fix error message print on undefined macro expansion in varnishtest. It would print to end of line instead of parsed macro name length.

Martin Blix Grydeland martin at varnish-cache.org
Thu Jun 13 12:41:24 CEST 2013


commit 673a8555d859a3785597480c0adc7d7ec98bd4dd
Author: Martin Blix Grydeland <martin at varnish-software.com>
Date:   Wed Jun 5 11:11:35 2013 +0200

    Fix error message print on undefined macro expansion in
    varnishtest. It would print to end of line instead of parsed macro
    name length.

diff --git a/bin/varnishtest/vtc.c b/bin/varnishtest/vtc.c
index a2c0571..aeb4296 100644
--- a/bin/varnishtest/vtc.c
+++ b/bin/varnishtest/vtc.c
@@ -196,7 +196,8 @@ macro_expand(struct vtclog *vl, const char *text)
 		m = macro_get(p, q);
 		if (m == NULL) {
 			VSB_delete(vsb);
-			vtc_log(vl, 0, "Macro ${%s} not found", p);
+			vtc_log(vl, 0, "Macro ${%.*s} not found", (int)(q - p),
+			    p);
 			return (NULL);
 		}
 		VSB_printf(vsb, "%s", m);



More information about the varnish-commit mailing list