mirror of
https://github.com/apache/nuttx.git
synced 2026-08-10 23:15:15 +00:00
lib_localtime:fix unsigned compare with zero
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
This commit is contained in:
parent
a56199c7dd
commit
49cd445114
1 changed files with 1 additions and 1 deletions
|
|
@ -1872,7 +1872,7 @@ static FAR struct tm *timesub(FAR const time_t *timep,
|
|||
y = EPOCH_YEAR;
|
||||
tdays = *timep / SECSPERDAY;
|
||||
rem = *timep - tdays * SECSPERDAY;
|
||||
while (tdays < 0 || tdays >= g_year_lengths[isleap(y)])
|
||||
while (tdays >= g_year_lengths[isleap(y)])
|
||||
{
|
||||
int newy;
|
||||
time_t tdelta;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue