File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -216,7 +216,7 @@ int mc146818_set_time(struct rtc_time *time)
216
216
unsigned char save_control , save_freq_select ;
217
217
unsigned int yrs ;
218
218
#ifdef CONFIG_MACH_DECSTATION
219
- unsigned int real_yrs , leap_yr ;
219
+ unsigned int real_yrs ;
220
220
#endif
221
221
unsigned char century = 0 ;
222
222
@@ -232,16 +232,14 @@ int mc146818_set_time(struct rtc_time *time)
232
232
233
233
#ifdef CONFIG_MACH_DECSTATION
234
234
real_yrs = yrs ;
235
- leap_yr = ((!((yrs + 1900 ) % 4 ) && ((yrs + 1900 ) % 100 )) ||
236
- !((yrs + 1900 ) % 400 ));
237
235
yrs = 72 ;
238
236
239
237
/*
240
238
* We want to keep the year set to 73 until March
241
239
* for non-leap years, so that Feb, 29th is handled
242
240
* correctly.
243
241
*/
244
- if (!leap_yr && mon < 3 ) {
242
+ if (!is_leap_year ( real_yrs + 1900 ) && mon < 3 ) {
245
243
real_yrs -- ;
246
244
yrs = 73 ;
247
245
}
You can’t perform that action at this time.
0 commit comments