You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by da...@apache.org on 2021/07/02 16:27:32 UTC

[incubator-nuttx] 04/09: libc/time: Change the type of ls_corr to int_fast32_t

This is an automated email from the ASF dual-hosted git repository.

davids5 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 4ecabe5fc23562ee22456c766710a484d077f8bf
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sun Jun 20 23:18:01 2021 +0800

    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 <xi...@xiaomi.com>
    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 3e48d2d..e9f2f81 100644
--- a/libs/libc/time/lib_localtime.c
+++ b/libs/libc/time/lib_localtime.c
@@ -272,7 +272,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
@@ -1851,10 +1851,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;