From 0812a2b446b953f0c850d15151821d91b56ce94c Mon Sep 17 00:00:00 2001 From: Peter Wemm Date: Mon, 17 Jul 1995 04:38:30 +0000 Subject: [PATCH] Fix the 'w' command so that the -h option correctly supresses the heading as per the manual page. Closes PR578. Reviewed by: Submitted by: Kenneth D. Merry Obtained from: --- usr.bin/w/w.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/w/w.c b/usr.bin/w/w.c index b5075339c708..685057d81e7f 100644 --- a/usr.bin/w/w.c +++ b/usr.bin/w/w.c @@ -217,11 +217,11 @@ main(argc, argv) pr_header(&now, nusers); if (wcmd == 0) exit (0); - } #define HEADER "USER TTY FROM LOGIN@ IDLE WHAT\n" #define WUSED (sizeof (HEADER) - sizeof ("WHAT\n")) - (void)printf(HEADER); + (void)printf(HEADER); + } if ((kp = kvm_getprocs(kd, KERN_PROC_ALL, 0, &nentries)) == NULL) err(1, "%s", kvm_geterr(kd));