diff --git a/bin/ps/print.c b/bin/ps/print.c index 0f2b14ae2af5..da8f2e0ab35d 100644 --- a/bin/ps/print.c +++ b/bin/ps/print.c @@ -180,7 +180,10 @@ ucomm(KINFO *k, VARENT *ve) VAR *v; v = ve->var; - (void)printf("%-*s", v->width, k->ki_p->ki_comm); + if (ve->next == NULL) /* last field, don't pad */ + (void)printf("%s", k->ki_p->ki_comm); + else + (void)printf("%-*s", v->width, k->ki_p->ki_comm); } void