summaryrefslogtreecommitdiff
path: root/nuttx/lib
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/lib')
-rw-r--r--nuttx/lib/lib_strcasecmp.c4
-rw-r--r--nuttx/lib/lib_strncasecmp.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/nuttx/lib/lib_strcasecmp.c b/nuttx/lib/lib_strcasecmp.c
index 425a3e639..d9c5e5636 100644
--- a/nuttx/lib/lib_strcasecmp.c
+++ b/nuttx/lib/lib_strcasecmp.c
@@ -54,10 +54,10 @@
#ifndef CONFIG_ARCH_STRCMP
int strcasecmp(const char *cs, const char *ct)
{
- register signed char result;
+ register int result;
for (;;)
{
- if ((result = toupper(*cs) - toupper(*ct)) != 0 || !*cs)
+ if ((result = (int)toupper(*cs) - (int)toupper(*ct)) != 0 || !*cs)
{
break;
}
diff --git a/nuttx/lib/lib_strncasecmp.c b/nuttx/lib/lib_strncasecmp.c
index 5b35bfff1..c34396a50 100644
--- a/nuttx/lib/lib_strncasecmp.c
+++ b/nuttx/lib/lib_strncasecmp.c
@@ -54,10 +54,10 @@
#ifndef CONFIG_ARCH_STRNCASECMP
int strncasecmp(const char *cs, const char *ct, size_t nb)
{
- register signed char result = 0;
+ register int result = 0;
for (; nb > 0; nb--)
{
- if ((result = toupper(*cs) - toupper(*ct)) != 0 || !*cs)
+ if ((result = (int)toupper(*cs) - (int)toupper(*ct)) != 0 || !*cs)
{
break;
}