summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorTobias Heider <tobhe@cvs.openbsd.org>2023-03-08 14:47:03 +0000
committerTobias Heider <tobhe@cvs.openbsd.org>2023-03-08 14:47:03 +0000
commitb2e8ebb66838d77f2a0c63c91a8b7297334e925c (patch)
tree7e5e6a40eaaf36cf7d206ca87209d2fff639fe72 /bin
parent993f01e17a56e007a8e30d636a6e6bdaf7fdfbc5 (diff)
Fix alignment of command column. print_comm_name() returns an updated
length value, not the length difference. ok deraadt@ millert@ guenther@
Diffstat (limited to 'bin')
-rw-r--r--bin/ps/print.c6
1 files 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)