Avoid padding the value of "ucomm" when it is the last column in the line.

Submitted by:	Cyrille Lefevre
This commit is contained in:
Garance A Drosehn 2004-06-23 12:18:36 +00:00
parent 820434b27f
commit 4e8a8d9f85

View File

@ -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