summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.bin/w/pr_time.c3
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)