From 216e5866870ea1794d701ca60cd61f4c0ebc097b Mon Sep 17 00:00:00 2001 From: Uladzimir Pylinski Date: Mon, 16 Mar 2015 14:36:22 +0000 Subject: RTC. Fixed conversion function. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7780 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/src/rtc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/os/hal/src/rtc.c b/os/hal/src/rtc.c index 653f6590b..9c7256e50 100644 --- a/os/hal/src/rtc.c +++ b/os/hal/src/rtc.c @@ -262,9 +262,9 @@ void rtcConvertStructTmToDateTime(const struct tm *timp, } /*lint -restore*/ /*lint -save -e9033 [10.8] Verified assignments to bit fields.*/ - timespec->millisecond = tv_msec + (uint32_t)((timp->tm_hour * 3600) + - (timp->tm_min * 60) + - (timp->tm_sec * 1000)); + timespec->millisecond = tv_msec + (uint32_t)(((timp->tm_hour * 3600) + + (timp->tm_min * 60) + + timp->tm_sec) * 1000); /*lint -restore*/ } -- cgit v1.2.3