Commit d785aa64 authored by Michael Veksler's avatar Michael Veksler Committed by Alexandre Julliard

Simplify propertyNameCmp() and fix a warning in the way by removing

CRTDLL__wcsupr() calls.
parent 364c1241
......@@ -1130,22 +1130,14 @@ static LONG propertyNameCmp(
OLECHAR *newProperty,
OLECHAR *currentProperty)
{
LONG sizeOfNew = (lstrlenW(newProperty) +1) * sizeof(WCHAR);
LONG sizeOfCur = (lstrlenW(currentProperty)+1) * sizeof(WCHAR);
LONG diff = sizeOfNew - sizeOfCur;
LONG diff = lstrlenW(newProperty) - lstrlenW(currentProperty);
if (diff == 0)
{
/*
* We compare the string themselves only when they are of the same lenght
*/
WCHAR wsnew[PROPERTY_NAME_MAX_LEN];
WCHAR wscur[PROPERTY_NAME_MAX_LEN];
diff = lstrcmpW( (LPCWSTR)CRTDLL__wcsupr(
lstrcpynW(wsnew, newProperty, sizeOfNew)),
(LPCWSTR)CRTDLL__wcsupr(
lstrcpynW(wscur, currentProperty, sizeOfCur)));
diff = lstrcmpiW( newProperty, currentProperty);
}
return diff;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment