aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/src/rtc.c
diff options
context:
space:
mode:
Diffstat (limited to 'os/hal/src/rtc.c')
-rw-r--r--os/hal/src/rtc.c6
1 files 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*/
}