[48/59] Minor SECSPERDAY widening tweak

Message ID 20250105055750.1668721-49-eggert@cs.ucla.edu (mailing list archive)
State New
Headers
Series time: sync mktime from Gnulib |

Checks

Context Check Description
redhat-pt-bot/TryBot-apply_patch success Patch applied to master at the time it was sent

Commit Message

Paul Eggert Jan. 5, 2025, 5:57 a.m. UTC
  * time/tzset.c (SECSPERDAY): Now an enum, not a macro.
There's no need to widen it to __time64_t, and keeping it
an enum can help the compiler do cheaper multiplication.
---
 time/tzset.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/time/tzset.c b/time/tzset.c
index f3af960620..cc64516e37 100644
--- a/time/tzset.c
+++ b/time/tzset.c
@@ -27,7 +27,7 @@ 
 
 #include <timezone/tzfile.h>
 
-#define SECSPERDAY ((__time64_t) 86400)
+enum { SECSPERDAY = 24 * 60 * 60 };
 
 char *__tzname[2] = { (char *) "UTC", (char *) "UTC" };
 int __daylight = 0;