diff mbox

[1/2] hw/exynos4210_rtc.c: Fix calculating for value of year

Message ID 1342001008-18305-2-git-send-email-o.ogurtsov@samsung.com
State New
Headers show

Commit Message

Oleg Ogurtsov July 11, 2012, 10:03 a.m. UTC
Signed-off-by: Oleg Ogurtsov <o.ogurtsov@samsung.com>
---
 hw/exynos4210_rtc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Peter Maydell July 20, 2012, 1:15 p.m. UTC | #1
On 11 July 2012 11:03, Oleg Ogurtsov <o.ogurtsov@samsung.com> wrote:
>
> Signed-off-by: Oleg Ogurtsov <o.ogurtsov@samsung.com>

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

-- PMM
diff mbox

Patch

diff --git a/hw/exynos4210_rtc.c b/hw/exynos4210_rtc.c
index f781020..b42586e 100644
--- a/hw/exynos4210_rtc.c
+++ b/hw/exynos4210_rtc.c
@@ -142,7 +142,7 @@  static const VMStateDescription vmstate_exynos4210_rtc_state = {
 };
 
 #define BCD3DIGITS(x) \
-    ((uint32_t)to_bcd((uint8_t)x) + \
+    ((uint32_t)to_bcd((uint8_t)(x % 100)) + \
     ((uint32_t)to_bcd((uint8_t)((x % 1000) / 100)) << 8))
 
 static void check_alarm_raise(Exynos4210RTCState *s)