From 266db9067e0c36d1fa0732f2a123f7155f593bf3 Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Sun, 20 Jun 2021 23:18:01 +0800 Subject: [PATCH] libc/time: Change the type of ls_corr to int_fast32_t since the leap correction is always four bytes in timezone file Signed-off-by: Xiang Xiao Change-Id: I2d72f5eaf37f0c86d95eaf7504a1b8b1469bf06a --- libs/libc/time/lib_localtime.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/libc/time/lib_localtime.c b/libs/libc/time/lib_localtime.c index 54fa5a7730d..15711709e40 100644 --- a/libs/libc/time/lib_localtime.c +++ b/libs/libc/time/lib_localtime.c @@ -271,7 +271,7 @@ struct ttinfo_s struct lsinfo_s { /* Leap second information */ time_t ls_trans; /* Transition time */ - int_fast64_t ls_corr; /* Correction to apply */ + int_fast32_t ls_corr; /* Correction to apply */ }; struct state_s @@ -1850,10 +1850,10 @@ static struct tm *timesub(FAR const time_t * const timep, const struct lsinfo_s *lp; time_t tdays; int idays; /* unsigned would be so 2003 */ - int_fast64_t rem; + int_fast32_t rem; int y; FAR const int *ip; - int_fast64_t corr; + int_fast32_t corr; int hit; int i;