diff options
Diffstat (limited to 'drivers/rtc/rtc-lib.c')
-rw-r--r-- | drivers/rtc/rtc-lib.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/rtc/rtc-lib.c b/drivers/rtc/rtc-lib.c index ad5bb21908e5..4a3c0f3aab14 100644 --- a/drivers/rtc/rtc-lib.c +++ b/drivers/rtc/rtc-lib.c | |||
@@ -65,7 +65,7 @@ void rtc_time64_to_tm(time64_t time, struct rtc_time *tm) | |||
65 | days -= (year - 1970) * 365 | 65 | days -= (year - 1970) * 365 |
66 | + LEAPS_THRU_END_OF(year - 1) | 66 | + LEAPS_THRU_END_OF(year - 1) |
67 | - LEAPS_THRU_END_OF(1970 - 1); | 67 | - LEAPS_THRU_END_OF(1970 - 1); |
68 | if (days < 0) { | 68 | while (days < 0) { |
69 | year -= 1; | 69 | year -= 1; |
70 | days += 365 + is_leap_year(year); | 70 | days += 365 + is_leap_year(year); |
71 | } | 71 | } |