diff options
author | 1999-01-02 08:24:51 +0000 | |
---|---|---|
committer | 1999-01-02 08:24:51 +0000 | |
commit | 90a8d928ce1dbc72665d2c549172d578ff2992ad (patch) | |
tree | 9447c54a41e928a3f82ae48f62c97c4ee7ea9dbf | |
parent | Forgotten file in the midi commit (diff) | |
download | wireguard-openbsd-90a8d928ce1dbc72665d2c549172d578ff2992ad.tar.xz wireguard-openbsd-90a8d928ce1dbc72665d2c549172d578ff2992ad.zip |
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; } |