mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 16:35:06 -05:00
leapdb: add explicit cast to int64_t
Add an explicit cast to int64_t to not rely on LEAP_SEC_LIST_OFFSET not fitting in 32-bit time_t.
This commit is contained in:
2
leapdb.c
2
leapdb.c
@@ -122,7 +122,7 @@ get_list_leap(time_t when, int *tai_offset)
|
||||
when = (when / (24 * 3600) + 1) * (24 * 3600);
|
||||
|
||||
/* leap-seconds.list timestamps are relative to 1 Jan 1900, 00:00:00 */
|
||||
when1900 = when + LEAP_SEC_LIST_OFFSET;
|
||||
when1900 = (int64_t)when + LEAP_SEC_LIST_OFFSET;
|
||||
|
||||
while (fgets(line, sizeof line, f) > 0) {
|
||||
int64_t lsl_when;
|
||||
|
||||
Reference in New Issue
Block a user