aboutsummaryrefslogtreecommitdiffstats
path: root/src/wchar/wcscmp.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2015-10-17 00:58:39 +0200
committerMattias Andrée <maandree@operamail.com>2015-10-17 00:58:39 +0200
commit69ed661a488c0e02bf5fee3dc21e6a31a99a8d85 (patch)
treed4172bd2932f8b163b58651dd2f1e14f535304c0 /src/wchar/wcscmp.c
parentm fixes (diff)
downloadslibc-69ed661a488c0e02bf5fee3dc21e6a31a99a8d85.tar.gz
slibc-69ed661a488c0e02bf5fee3dc21e6a31a99a8d85.tar.bz2
slibc-69ed661a488c0e02bf5fee3dc21e6a31a99a8d85.tar.xz
fix errors
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src/wchar/wcscmp.c')
-rw-r--r--src/wchar/wcscmp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/wchar/wcscmp.c b/src/wchar/wcscmp.c
index ddbd228..980906d 100644
--- a/src/wchar/wcscmp.c
+++ b/src/wchar/wcscmp.c
@@ -17,7 +17,7 @@
*/
#include <wchar.h>
#include <stdint.h>
-#include <wctype.h>
+/* TODO #include <wctype.h> */
@@ -54,7 +54,7 @@ int wmemcasecmp(const wchar_t* a, const wchar_t* b, size_t size)
{
wchar_t c1, c2;
for (; size--; a++, b++)
- if (*a != *b);
+ if (*a != *b)
{
c1 = iswalpha(*a) ? towlower(*a) : *a;
c2 = iswalpha(*b) ? towlower(*b) : *b;
@@ -115,7 +115,7 @@ int wcsncmp(const wchar_t* a, const wchar_t* b, size_t length)
size_t n = wcsnlen(a, length);
size_t m = wcsnlen(b, length);
int r = wmemcmp(a, b, (n < m ? n : m));
- return r ? r : n == m ? 0 : n < m ? -1 : +1
+ return r ? r : n == m ? 0 : n < m ? -1 : +1;
}