From da79d21b289237036392b3a95ca568ca0cb00cf5 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Sun, 30 Nov 2014 15:08:24 +0000 Subject: [PATCH] timer: fix struct assigns SDCC isn't fond of them so be explicit --- Kernel/timer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Kernel/timer.c b/Kernel/timer.c index 76321f99..4a606f2c 100644 --- a/Kernel/timer.c +++ b/Kernel/timer.c @@ -27,7 +27,7 @@ bool timer_expired(timer_t timer_val) void rdtime(time_t *tloc) { irqflags_t irq = di(); - *tloc = tod; + memcpy(tloc, &tod, sizeof(tod)); irqrestore(irq); } @@ -42,7 +42,7 @@ void rdtime32(uint32_t *tloc) void wrtime(time_t *tloc) { irqflags_t irq = di(); - tod = *tloc; + memcpy(&tod, tloc, sizeof(tod)); #ifdef CONFIG_RTC machine_set_clock(tloc); #endif -- 2.34.1