[master] 4d17b66b5 varnishstat: Fix missing description of the last VSC

Nils Goroll nils.goroll at uplex.de
Mon Jan 22 18:23:07 UTC 2024


commit 4d17b66b53877d95a6fb2153dc22f38c3187baf8
Author: Walid Boudebouda <walid.boudebouda at gmail.com>
Date:   Tue Jan 16 11:32:04 2024 +0100

    varnishstat: Fix missing description of the last VSC

diff --git a/bin/varnishstat/varnishstat_curses.c b/bin/varnishstat/varnishstat_curses.c
index c9d7117b3..6938fbdb3 100644
--- a/bin/varnishstat/varnishstat_curses.c
+++ b/bin/varnishstat/varnishstat_curses.c
@@ -847,7 +847,7 @@ draw_bar_b(void)
 	if (page_start + l_points < n_ptarray)
 		mvwprintw(w_bar_b, 0, x, "vvv");
 	x += 4;
-	if (current < n_ptarray - 1)
+	if (current < n_ptarray)
 		mvwprintw(w_bar_b, 0, x, "%s", ptarray[current]->vpt->name);
 
 	bprintf(buf, "%d-%d/%d", page_start + 1,
@@ -880,7 +880,7 @@ draw_info(void)
 		return;
 
 	werase(w_info);
-	if (current < n_ptarray - 1) {
+	if (current < n_ptarray) {
 		/* XXX: Word wrapping, and overflow handling? */
 		mvwprintw(w_info, 0, 0, "%s:",
 		    ptarray[current]->vpt->sdesc);


More information about the varnish-commit mailing list