diff options
author | Tobias Weingartner <weingart@cvs.openbsd.org> | 1999-01-02 08:24:52 +0000 |
---|---|---|
committer | Tobias Weingartner <weingart@cvs.openbsd.org> | 1999-01-02 08:24:52 +0000 |
commit | 4337ecbb12a813b40d4fd37980ada605f6719742 (patch) | |
tree | f1df2c152243eb22245a3f1ef3f0f13397483e2c | |
parent | f1ce9ab7b99a82f5ece96b854569f95491842b55 (diff) |
Clean up some -Wall stuff, and a potential problem if TM_TIME_BASE was not
1900.
-rw-r--r-- | bin/date/date.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/bin/date/date.c b/bin/date/date.c index ce21c5cfc0f..a8d57374ff9 100644 --- a/bin/date/date.c +++ b/bin/date/date.c @@ -1,4 +1,4 @@ -/* $OpenBSD: date.c,v 1.11 1998/09/01 04:57:27 pjanzen Exp $ */ +/* $OpenBSD: date.c,v 1.12 1999/01/02 08:24:51 weingart Exp $ */ /* $NetBSD: date.c,v 1.11 1995/09/07 06:21:05 jtc Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)date.c 8.2 (Berkeley) 4/28/95"; #else -static char rcsid[] = "$OpenBSD: date.c,v 1.11 1998/09/01 04:57:27 pjanzen Exp $"; +static char rcsid[] = "$OpenBSD: date.c,v 1.12 1999/01/02 08:24:51 weingart Exp $"; #endif #endif /* not lint */ @@ -191,7 +191,8 @@ setthetime(p) if (yearset) { lt->tm_year += ATOI2(p); } else { - lt->tm_year = ATOI2(p) + 1900 - TM_YEAR_BASE; + lt->tm_year = ATOI2(p); + lt->tm_year += (1900 - TM_YEAR_BASE); if (lt->tm_year < 69) /* hack for 2000 ;-} */ lt->tm_year += 100; } |