Skip to content
Snippets Groups Projects
Verified Commit 758b4371 authored by jD91mZM2's avatar jD91mZM2
Browse files

Run fmt.sh

parent b7e11afd
No related branches found
No related tags found
No related merge requests found
......@@ -218,11 +218,7 @@ pub unsafe extern "C" fn localtime_r(clock: *const time_t, r: *mut tm) -> *mut t
(*r).tm_year = 1970;
loop {
let days_in_year = if leap_year((*r).tm_year) {
366
} else {
365
};
let days_in_year = if leap_year((*r).tm_year) { 366 } else { 365 };
if days < days_in_year {
break;
......@@ -240,9 +236,9 @@ pub unsafe extern "C" fn localtime_r(clock: *const time_t, r: *mut tm) -> *mut t
const MONTH_DAYS: [[c_int; 12]; 2] = [
// Non-leap years:
[ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 ],
[31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],
// Leap years:
[ 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 ],
[31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],
];
let leap = if leap_year((*r).tm_year) { 1 } else { 0 };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment