From 2643f27b360d44dcb5514072316eb112a867904e Mon Sep 17 00:00:00 2001 From: Todd Zullinger Date: Mon, 17 Jul 2023 23:16:00 -0400 Subject: [PATCH] lastlog: fix alignment of Latest header b1282224 (Add maximum padding to fit IPv6-Addresses, 2020-05-24) pads the From field header using `maxIPv6Addrlen - 3`. This leaves the Latest field header misaligned. Subtract 4 (the length of "From"). --- src/lastlog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lastlog.c b/src/lastlog.c index 6b9619740..1db668871 100644 --- a/src/lastlog.c +++ b/src/lastlog.c @@ -143,7 +143,7 @@ static void print_one (/*@null@*/const struct passwd *pw) /* Print the header only once */ if (!once) { #ifdef HAVE_LL_HOST - printf (_("Username Port From%*sLatest\n"), maxIPv6Addrlen-3, " "); + printf (_("Username Port From%*sLatest\n"), maxIPv6Addrlen-4, " "); #else puts (_("Username Port Latest")); #endif -- 2.47.2