libs/libc/locale/lib_setlocale.c: Improved error handling in setlocale().
This commit is contained in:
parent
604f699711
commit
251009de3a
@ -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…
Reference in New Issue
Block a user