mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 16:35:06 -05:00
rtc+getdate: initialize tm_wday for mktime()
Even though mktime() is documented as ignoring the tm_wday field, the coverity static analyzer complains about passing an uninitialized value. Set the field to zero to make it happy.
This commit is contained in:
@@ -802,6 +802,7 @@ read_from_device(int fd_, int event, void *any)
|
||||
rtc_tm.tm_mday = rtc_raw.tm_mday;
|
||||
rtc_tm.tm_mon = rtc_raw.tm_mon;
|
||||
rtc_tm.tm_year = rtc_raw.tm_year;
|
||||
rtc_tm.tm_wday = 0;
|
||||
|
||||
rtc_t = t_from_rtc(&rtc_tm);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user