diff options
author | Mattias Andrée <maandree@operamail.com> | 2015-10-17 00:58:39 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2015-10-17 00:58:39 +0200 |
commit | 69ed661a488c0e02bf5fee3dc21e6a31a99a8d85 (patch) | |
tree | d4172bd2932f8b163b58651dd2f1e14f535304c0 /src/wchar/wcscmp.c | |
parent | m fixes (diff) | |
download | slibc-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.c | 6 |
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; } |