summaryrefslogtreecommitdiff
path: root/bin/ps/print.c
diff options
context:
space:
mode:
authorPhilip Guenthe <guenther@cvs.openbsd.org>2011-12-29 17:13:56 +0000
committerPhilip Guenthe <guenther@cvs.openbsd.org>2011-12-29 17:13:56 +0000
commitca6e8a65a743155f0952eff98ff5bf1f28e4572d (patch)
treecb5865fcd771013bcc7b9fe21e017b7d240a9572 /bin/ps/print.c
parent9a7af7ec309e1b8bc76d267187bcc3a827a20c9b (diff)
Suppress the header line if all the field headers have been set to empty.
ok millert@
Diffstat (limited to 'bin/ps/print.c')
-rw-r--r--bin/ps/print.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/ps/print.c b/bin/ps/print.c
index 2c3b84f19fd..1f0000efb60 100644
--- a/bin/ps/print.c
+++ b/bin/ps/print.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: print.c,v 1.51 2011/12/11 00:16:49 nicm Exp $ */
+/* $OpenBSD: print.c,v 1.52 2011/12/29 17:13:55 guenther Exp $ */
/* $NetBSD: print.c,v 1.27 1995/09/29 21:58:12 cgd Exp $ */
/*-
@@ -76,6 +76,8 @@ printheader(void)
VAR *v;
struct varent *vent;
+ if (!needheader)
+ return;
for (vent = vhead; vent; vent = vent->next) {
v = vent->var;
if (v->flag & LJUST) {