[master] ff8caf99a [vstat] save a pair of lines

Nils Goroll nils.goroll at uplex.de
Wed Apr 1 08:33:07 UTC 2020


commit ff8caf99aa9d67f5d5df7cae31d60b3c1d1cebb2
Author: Guillaume Quintard <guillaume at varnish-software.com>
Date:   Tue Feb 4 16:33:07 2020 -0800

    [vstat] save a pair of lines

diff --git a/bin/varnishstat/varnishstat.c b/bin/varnishstat/varnishstat.c
index 347493e7a..df654b008 100644
--- a/bin/varnishstat/varnishstat.c
+++ b/bin/varnishstat/varnishstat.c
@@ -134,12 +134,10 @@ do_json(struct vsm *vsm, struct vsc *vsc)
 	int jp;
 
 	jp = 1;
-
-	printf("{\n");
 	now = time(NULL);
 
 	(void)strftime(time_stamp, 20, "%Y-%m-%dT%H:%M:%S", localtime(&now));
-	printf("  \"timestamp\": \"%s\",\n", time_stamp);
+	printf("{\n  \"timestamp\": \"%s\",\n", time_stamp);
 	(void)VSC_Iter(vsc, vsm, do_json_cb, &jp);
 	printf("\n}\n");
 }


More information about the varnish-commit mailing list