Author: hbelusca
Date: Sun Jun 2 22:44:09 2013
New Revision: 59164
URL:
http://svn.reactos.org/svn/reactos?rev=59164&view=rev
Log:
[RTL]
Clarify the code a bit, no logical changes.
Modified:
trunk/reactos/lib/rtl/unicode.c
Modified: trunk/reactos/lib/rtl/unicode.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/unicode.c?rev=5916…
==============================================================================
--- trunk/reactos/lib/rtl/unicode.c [iso-8859-1] (original)
+++ trunk/reactos/lib/rtl/unicode.c [iso-8859-1] Sun Jun 2 22:44:09 2013
@@ -875,24 +875,24 @@
RtlPrefixUnicodeString(
PCUNICODE_STRING String1,
PCUNICODE_STRING String2,
- BOOLEAN CaseInsensitive)
+ BOOLEAN CaseInsensitive)
{
PWCHAR pc1;
PWCHAR pc2;
- ULONG Length;
+ ULONG NumChars;
if (String2->Length < String1->Length)
return FALSE;
- Length = String1->Length / 2;
+ NumChars = String1->Length / sizeof(WCHAR);
pc1 = String1->Buffer;
- pc2 = String2->Buffer;
+ pc2 = String2->Buffer;
if (pc1 && pc2)
{
if (CaseInsensitive)
{
- while (Length--)
+ while (NumChars--)
{
if (RtlUpcaseUnicodeChar(*pc1++) !=
RtlUpcaseUnicodeChar(*pc2++))
@@ -901,9 +901,9 @@
}
else
{
- while (Length--)
+ while (NumChars--)
{
- if( *pc1++ != *pc2++ )
+ if (*pc1++ != *pc2++)
return FALSE;
}
}