strptime.c:len is not defined.

Bring all code that uses the variable len under the CONFIG_LIBC_LOCALE

Signed-off-by: chenjiahua1 <chenjiahua1@xiaomi.com>
This commit is contained in:
chenjiahua1 2024-09-27 14:19:16 +08:00 committed by GUIDINGLI
parent 64eecbfede
commit c1fb6974ac
1 changed files with 6 additions and 1 deletions

View File

@ -78,6 +78,8 @@ FAR char *strptime(FAR const char *restrict s, FAR const char *restrict f,
int relyear = 0;
#ifdef CONFIG_LIBC_LOCALE
FAR const char *ex;
#endif
#if defined(CONFIG_LIBC_LOCALE) || defined(CONFIG_LIBC_LOCALTIME)
size_t len;
#endif
@ -398,7 +400,10 @@ FAR char *strptime(FAR const char *restrict s, FAR const char *restrict f,
{
/* Skip unknown timezone abbreviations */
while ((*s | 32) - 'a' <= 'z' - 'a') s++;
while ((*s | 32) - 'a' <= 'z' - 'a')
{
s++;
}
}
break;