From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:59598) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SsEh5-000355-AF for qemu-devel@nongnu.org; Fri, 20 Jul 2012 11:00:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SsEgz-0006Sg-Dp for qemu-devel@nongnu.org; Fri, 20 Jul 2012 11:00:39 -0400 Received: from mnementh.archaic.org.uk ([81.2.115.146]:57941) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SsEgz-0006Q0-6v for qemu-devel@nongnu.org; Fri, 20 Jul 2012 11:00:33 -0400 From: Peter Maydell Date: Fri, 20 Jul 2012 16:00:28 +0100 Message-Id: <1342796430-16636-9-git-send-email-peter.maydell@linaro.org> In-Reply-To: <1342796430-16636-1-git-send-email-peter.maydell@linaro.org> References: <1342796430-16636-1-git-send-email-peter.maydell@linaro.org> Subject: [Qemu-devel] [PATCH 08/10] hw/exynos4210_rtc.c: Fix calculating for value of year List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori , Blue Swirl Cc: qemu-devel@nongnu.org, Paul Brook From: Oleg Ogurtsov Signed-off-by: Oleg Ogurtsov Signed-off-by: Peter Maydell --- hw/exynos4210_rtc.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) 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) -- 1.7.5.4