Clarify the code a bit, no logical changes.
svn path=/trunk/; revision=59164
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++))
}
else
{
- while (Length--)
+ while (NumChars--)
{
- if( *pc1++ != *pc2++ )
+ if (*pc1++ != *pc2++)
return FALSE;
}
}