libs/libc/locale/lib_setlocale.c: Improved error handling in setlocale().
This commit is contained in:
parent
604f699711
commit
251009de3a
1 changed files with 5 additions and 0 deletions
|
|
@ -63,6 +63,11 @@
|
|||
|
||||
FAR char *setlocale(int category, FAR const char *locale)
|
||||
{
|
||||
if (locale == NULL)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return ((strcmp(locale, "POSIX") == 0 || strcmp(locale, "C") == 0 ||
|
||||
strcmp(locale, "") == 0) ? "C" : NULL);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue