mirror of
https://github.com/apache/nuttx.git
synced 2026-06-02 09:38:37 +08:00
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:
@@ -78,6 +78,8 @@ FAR char *strptime(FAR const char *restrict s, FAR const char *restrict f,
|
|||||||
int relyear = 0;
|
int relyear = 0;
|
||||||
#ifdef CONFIG_LIBC_LOCALE
|
#ifdef CONFIG_LIBC_LOCALE
|
||||||
FAR const char *ex;
|
FAR const char *ex;
|
||||||
|
#endif
|
||||||
|
#if defined(CONFIG_LIBC_LOCALE) || defined(CONFIG_LIBC_LOCALTIME)
|
||||||
size_t len;
|
size_t len;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -398,7 +400,10 @@ FAR char *strptime(FAR const char *restrict s, FAR const char *restrict f,
|
|||||||
{
|
{
|
||||||
/* Skip unknown timezone abbreviations */
|
/* Skip unknown timezone abbreviations */
|
||||||
|
|
||||||
while ((*s | 32) - 'a' <= 'z' - 'a') s++;
|
while ((*s | 32) - 'a' <= 'z' - 'a')
|
||||||
|
{
|
||||||
|
s++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user