diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-05-19 15:50:39 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-05-19 15:50:39 +0000 |
commit | 4556aef9abad33f32264c575d488c0c62b9ef009 (patch) | |
tree | 20da08e5e6f9a4e02fb1df9f86725bcc3db24850 /usr.bin | |
parent | 56fda7f8e85af56db17ff5f004b1d2c8adbf15b7 (diff) |
do not print "1days" in idle field
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/w/pr_time.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/w/pr_time.c b/usr.bin/w/pr_time.c index 87fffb36333..112c3a39366 100644 --- a/usr.bin/w/pr_time.c +++ b/usr.bin/w/pr_time.c @@ -91,7 +91,8 @@ pr_idle(idle) { /* If idle more than 36 hours, print as a number of days. */ if (idle >= 36 * SECSPERHOUR) - (void)printf(" %ddays ", idle / SECSPERDAY); + (void)printf(" %dday%c ", idle / SECSPERDAY, + idle >= 24 * SECPERHOUR ? 's' : ' '); /* If idle more than an hour, print as HH:MM. */ else if (idle >= SECSPERHOUR) |