1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-12-24 17:51:17 +03:00

Fix signedness in wcscmp comparison

This commit is contained in:
Liubov Dmitrieva
2011-10-23 13:34:15 -04:00
committed by Ulrich Drepper
parent 774a2669af
commit 95584d3b33
5 changed files with 239 additions and 132 deletions

View File

@@ -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)