timer: fix struct assigns
authorAlan Cox <alan@etchedpixels.co.uk>
Sun, 30 Nov 2014 15:08:24 +0000 (15:08 +0000)
committerAlan Cox <alan@etchedpixels.co.uk>
Sun, 30 Nov 2014 15:08:24 +0000 (15:08 +0000)
SDCC isn't fond of them so be explicit

Kernel/timer.c

index 76321f9..4a606f2 100644 (file)
@@ -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