summaryrefslogtreecommitdiffstats
path: root/usr.bin/w
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1995-07-17 04:38:30 +0000
committerpeter <peter@FreeBSD.org>1995-07-17 04:38:30 +0000
commitacdf972e197ad2db90e17295893638bc7e6119dd (patch)
tree266c9d6de676a4cf7b6678416e4bade2b8cae77b /usr.bin/w
parente3afff6c25d39d4c845ff9307b3d769a5d31a688 (diff)
downloadFreeBSD-src-acdf972e197ad2db90e17295893638bc7e6119dd.zip
FreeBSD-src-acdf972e197ad2db90e17295893638bc7e6119dd.tar.gz
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:
Diffstat (limited to 'usr.bin/w')
-rw-r--r--usr.bin/w/w.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/w/w.c b/usr.bin/w/w.c
index b507533..685057d 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));
OpenPOWER on IntegriCloud