|
Message-Id: <20210228192210.1665554-1-maandree@kth.se> Date: Sun, 28 Feb 2021 20:22:09 +0100 From: Mattias Andrée <maandree@....se> To: musl@...ts.openwall.com Cc: Mattias Andrée <maandree@....se> Subject: [PATCH v2 1/2] Remove unnecessary if in __secs_to_tm Since years divisible by 100 but not by 400 are not leap years, q_cycles can at most be 24 (DAYS_PER_100Y / DAYS_PER_4Y == 24). --- src/time/__secs_to_tm.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/time/__secs_to_tm.c b/src/time/__secs_to_tm.c index 093d9021..62219df5 100644 --- a/src/time/__secs_to_tm.c +++ b/src/time/__secs_to_tm.c @@ -44,7 +44,6 @@ int __secs_to_tm(long long t, struct tm *tm) remdays -= c_cycles * DAYS_PER_100Y; q_cycles = remdays / DAYS_PER_4Y; - if (q_cycles == 25) q_cycles--; remdays -= q_cycles * DAYS_PER_4Y; remyears = remdays / 365; -- 2.30.1
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.