diff options
author | Liubov Dmitrieva <liubov.dmitrieva@gmail.com> | 2011-10-23 13:34:15 -0400 |
---|---|---|
committer | Ulrich Drepper <drepper@gmail.com> | 2011-10-23 13:34:15 -0400 |
commit | 95584d3b3309ff4da4cc458254df383f5cff044b (patch) | |
tree | 2b8c9a0284e2b33c15b1d7cc48ef6e72d1a9207e /wcsmbs | |
parent | 774a2669af652979ed965d7225502ba473b2da73 (diff) | |
download | glibc-95584d3b3309ff4da4cc458254df383f5cff044b.tar glibc-95584d3b3309ff4da4cc458254df383f5cff044b.tar.gz glibc-95584d3b3309ff4da4cc458254df383f5cff044b.tar.bz2 glibc-95584d3b3309ff4da4cc458254df383f5cff044b.zip |
Fix signedness in wcscmp comparison
Diffstat (limited to 'wcsmbs')
-rw-r--r-- | wcsmbs/wcscmp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/wcsmbs/wcscmp.c b/wcsmbs/wcscmp.c index 6c93f702f6..ddbd4aa93f 100644 --- a/wcsmbs/wcscmp.c +++ b/wcsmbs/wcscmp.c @@ -37,11 +37,11 @@ WCSCMP (s1, s2) { c1 = (wint_t) *s1++; c2 = (wint_t) *s2++; - if (c1 == L'\0') + if (c2 == L'\0') return c1 - c2; } while (c1 == c2); - return c1 - c2; + return c1 < c2 ? -1 : 1; } libc_hidden_def (WCSCMP) |