summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2020-06-19 22:20:09 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2020-06-19 22:20:09 +0000
commit94edca532d5ad8c01dce85effe27a7439ac37b9f (patch)
tree6c7ed89c3d53f115871489c03261216885d2e7c2 /sys/arch
parent3d038018515d72f91978940930b3bd89073e75ef (diff)
Fix calculation of the year.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/powerpc64/dev/opal.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/powerpc64/dev/opal.c b/sys/arch/powerpc64/dev/opal.c
index 152fc3a3391..c86755da085 100644
--- a/sys/arch/powerpc64/dev/opal.c
+++ b/sys/arch/powerpc64/dev/opal.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: opal.c,v 1.2 2020/06/14 17:56:54 kettenis Exp $ */
+/* $OpenBSD: opal.c,v 1.3 2020/06/19 22:20:08 kettenis Exp $ */
/*
* Copyright (c) 2020 Mark Kettenis <kettenis@openbsd.org>
*
@@ -102,7 +102,7 @@ opal_gettime(struct todr_chip_handle *ch, struct timeval *tv)
dt.dt_day = FROMBCD((date >> 0) & 0xff);
dt.dt_mon = FROMBCD((date >> 8) & 0xff);
dt.dt_year = FROMBCD((date >> 16) & 0xff);
- dt.dt_year |= 100 * FROMBCD((date >> 24) & 0xff);
+ dt.dt_year += 100 * FROMBCD((date >> 24) & 0xff);
tv->tv_sec = clock_ymdhms_to_secs(&dt);
tv->tv_usec = 0;