[tz] [PROPOSED 1/2] Do not assume unsigned->signed conversion style
Paul Eggert
eggert at cs.ucla.edu
Fri Apr 23 19:07:05 UTC 2021
* localtime.c (detzcode64): Use int_fast64_t, not uint_fast64_t,
for local variable, to avoid an implementation-defined conversion
when the variable’s value is returned.
---
localtime.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/localtime.c b/localtime.c
index 6c88b6e..9dd496d 100644
--- a/localtime.c
+++ b/localtime.c
@@ -237,7 +237,7 @@ detzcode(const char *const codep)
static int_fast64_t
detzcode64(const char *const codep)
{
- register uint_fast64_t result;
+ register int_fast64_t result;
register int i;
int_fast64_t one = 1;
int_fast64_t halfmaxval = one << (64 - 2);
--
2.27.0
More information about the tz
mailing list