summaryrefslogtreecommitdiffstats
path: root/usr.bin/finger/lprint.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/finger/lprint.c')
-rw-r--r--usr.bin/finger/lprint.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/finger/lprint.c b/usr.bin/finger/lprint.c
index 16a10a5..d74b21e 100644
--- a/usr.bin/finger/lprint.c
+++ b/usr.bin/finger/lprint.c
@@ -189,7 +189,8 @@ no_gecos:
* idle time. Follow with a comma if a remote login.
*/
delta = gmtime(&w->idletime);
- if (delta->tm_yday || delta->tm_hour || delta->tm_min) {
+ if (w->idletime != -1 && (delta->tm_yday ||
+ delta->tm_hour || delta->tm_min)) {
cpr += printf("%-*s idle ",
maxlen - (int)strlen(w->tty) + 1, ",");
if (delta->tm_yday > 0) {
OpenPOWER on IntegriCloud