From ea6f9b1d691fc1363da06cf5b2db4e480403f830 Mon Sep 17 00:00:00 2001 From: hubertf Date: Sun, 19 Apr 1998 19:52:33 +0000 Subject: [PATCH] Print sane values on uptime >1 year, per PR 5318 by Heiko Rupp --- usr.bin/ruptime/ruptime.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.bin/ruptime/ruptime.c b/usr.bin/ruptime/ruptime.c index b2df15be84f2..a51747318268 100644 --- a/usr.bin/ruptime/ruptime.c +++ b/usr.bin/ruptime/ruptime.c @@ -1,4 +1,4 @@ -/* $NetBSD: ruptime.c,v 1.6 1997/10/19 14:26:26 lukem Exp $ */ +/* $NetBSD: ruptime.c,v 1.7 1998/04/19 19:52:33 hubertf Exp $ */ /* * Copyright (c) 1983, 1993, 1994 @@ -41,7 +41,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 1993, 1994\n\ #ifndef lint /*static char sccsid[] = "from: @(#)ruptime.c 8.2 (Berkeley) 4/5/94";*/ -__RCSID("$NetBSD: ruptime.c,v 1.6 1997/10/19 14:26:26 lukem Exp $"); +__RCSID("$NetBSD: ruptime.c,v 1.7 1998/04/19 19:52:33 hubertf Exp $"); #endif /* not lint */ #include @@ -200,7 +200,7 @@ interval(tval, updown) static char resbuf[32]; int days, hours, minutes; - if (tval < 0 || tval > DAYSPERNYEAR * SECSPERDAY) { + if (tval < 0) { (void)snprintf(resbuf, sizeof(resbuf), " %s ??:??", updown); return (resbuf); }