libc: Change the return type of strerror from "const char *" to "char *"

to follow up the spec here:
https://pubs.opengroup.org/onlinepubs/9699919799/functions/strerror.html

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao
2022-03-20 17:58:42 +08:00
committed by Petro Karashchenko
parent fa42ebace4
commit 6b8274fbd8
3 changed files with 5 additions and 5 deletions
+3 -3
View File
@@ -38,8 +38,8 @@
struct errno_strmap_s
{
uint8_t errnum;
const char *str;
uint8_t errnum;
FAR char *str;
};
/****************************************************************************
@@ -341,7 +341,7 @@ static const struct errno_strmap_s g_errnomap[] =
* Name: strerror
****************************************************************************/
FAR const char *strerror(int errnum)
FAR char *strerror(int errnum)
{
#ifdef CONFIG_LIBC_STRERROR
int ndxlow = 0;