summaryrefslogtreecommitdiffstats
path: root/newlib/libc/string/strlwr.c
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/string/strlwr.c')
-rw-r--r--newlib/libc/string/strlwr.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/newlib/libc/string/strlwr.c b/newlib/libc/string/strlwr.c
index 47096d430..3b73dba4b 100644
--- a/newlib/libc/string/strlwr.c
+++ b/newlib/libc/string/strlwr.c
@@ -34,17 +34,13 @@ QUICKREF
#include <ctype.h>
char *
-strlwr (a)
- char *a;
+_DEFUN (strlwr, (s),
+ char *s)
{
- char *ret = a;
-
- while (*a != '\0')
+ unsigned char *ucs = (unsigned char *) s;
+ for ( ; *ucs != '\0'; ucs++)
{
- if (isupper (*a))
- *a = tolower (*a);
- ++a;
+ *ucs = tolower(*ucs);
}
-
- return ret;
+ return s;
}