summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrahnds <rahnds@openbsd.org>2000-03-23 04:12:48 +0000
committerrahnds <rahnds@openbsd.org>2000-03-23 04:12:48 +0000
commit62fe0ee6df147251508c0b4d154fb71ed7e0f77f (patch)
tree113b8d19ec14eae97102d36edecc6056af518da1
parentadd mii and if_gm ethernet. (diff)
downloadwireguard-openbsd-62fe0ee6df147251508c0b4d154fb71ed7e0f77f.tar.xz
wireguard-openbsd-62fe0ee6df147251508c0b4d154fb71ed7e0f77f.zip
If failure occurs on clock reading routine, make certain that the time
translation failes.
-rw-r--r--sys/arch/powerpc/powerpc/clock.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/arch/powerpc/powerpc/clock.c b/sys/arch/powerpc/powerpc/clock.c
index 8cce28d6904..8ce5d57b888 100644
--- a/sys/arch/powerpc/powerpc/clock.c
+++ b/sys/arch/powerpc/powerpc/clock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: clock.c,v 1.5 1999/11/09 00:20:41 rahnds Exp $ */
+/* $OpenBSD: clock.c,v 1.6 2000/03/23 04:12:48 rahnds Exp $ */
/* $NetBSD: clock.c,v 1.1 1996/09/30 16:34:40 ws Exp $ */
/*
@@ -102,7 +102,10 @@ inittodr(base)
if (clock_read != NULL ) {
(*clock_read)( &sec, &min, &hour, &day, &mon, &year);
- }
+ } else {
+ /* force failure on chiptotime */
+ mon = 0;
+ }
if ((time.tv_sec = chiptotime(sec, min, hour, day, mon, year)) == 0) {
printf("WARNING: unable to get date/time");
/*