From 66cbf9ab4ab5bff05c7ccf5809eccaa8ed00d0bb Mon Sep 17 00:00:00 2001 From: tobhe Date: Wed, 8 Mar 2023 14:47:02 +0000 Subject: [PATCH] Fix alignment of command column. print_comm_name() returns an updated length value, not the length difference. ok deraadt@ millert@ guenther@ --- bin/ps/print.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/ps/print.c b/bin/ps/print.c index 21709700847..1704522b71e 100644 --- a/bin/ps/print.c +++ b/bin/ps/print.c @@ -1,4 +1,4 @@ -/* $OpenBSD: print.c,v 1.85 2023/01/07 05:24:59 guenther Exp $ */ +/* $OpenBSD: print.c,v 1.86 2023/03/08 14:47:02 tobhe Exp $ */ /* $NetBSD: print.c,v 1.27 1995/09/29 21:58:12 cgd Exp $ */ /*- @@ -182,7 +182,7 @@ command(const struct pinfo *pi, VARENT *ve) } putchar('('); left--; - left -= print_comm_name(kp, left, 0); + left = print_comm_name(kp, left, 0); if (left == 0) return; putchar(')'); @@ -193,7 +193,7 @@ command(const struct pinfo *pi, VARENT *ve) putchar(' '); left--; } - left -= print_comm_name(kp, left, 0); + left = print_comm_name(kp, left, 0); } } if (ve->next != NULL) -- 2.20.1