diff --git a/bin/ps/print.c b/bin/ps/print.c index 31a857bd81a9..86e9b45922c9 100644 --- a/bin/ps/print.c +++ b/bin/ps/print.c @@ -72,7 +72,16 @@ printheader(void) { VAR *v; struct varent *vent; + int allempty; + allempty = 1; + for (vent = vhead; vent; vent = vent->next) + if (*vent->var->header != '\0') { + allempty = 0; + break; + } + if (allempty) + return; for (vent = vhead; vent; vent = vent->next) { v = vent->var; if (v->flag & LJUST) {